MPL3: Fix breaking change #12
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: "Deploy to NuGet" | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
PROJECT_PATH: 'Warcraft.NET/Warcraft.NET.csproj' | |
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output | |
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' | |
jobs: | |
deploy: | |
name: 'Deploy' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
- name: 'Install dotnet' | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.x.x' | |
- name: 'Restore packages' | |
run: dotnet restore ${{ env.PROJECT_PATH }} | |
- name: 'Build project' | |
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release | |
- name: Stripping any v-prefix from version | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: 'Pack project' | |
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release -p:PackageVersion=${{ env.VERSION }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
- name: 'Push package' | |
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }} |