1.2.1.2-ydm-0.1.6 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Nuget Package | |
on: | |
release: | |
types: [published] | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: windows-2019 | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup MSBuild | |
uses: microsoft/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '5.0.x' | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
with: | |
nuget-api-key: ${{ secrets.NUGET_TOKEN }} | |
- name: Restore Nuget | |
run: nuget restore CSCore.sln | |
- name: Build Solution | |
run: | | |
msbuild.exe CSCore.sln /p:Platform="Any CPU" /p:Configuration=Release | |
- name: Pack | |
shell: cmd | |
run: nuget pack ./CSCore/CSCore.csproj -OutputDirectory nupkgs -Version ${{ env.VERSION }} -Properties version="${{ env.VERSION }}";Configuration="Release";Platform="AnyCPU" | |
- name: Nuget Publish | |
shell: cmd | |
run: nuget push nupkgs\*.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json |