Skip to content

Publish

Publish #4

Workflow file for this run

name: Publish
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release -v normal -p:Version=${{ github.ref_name }}
- name: Pack (Beta)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o . -p:PackageVersion=${{ github.ref_name }}-beta
if: "github.event.release.prerelease"
- name: Pack (Stable)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o . -p:PackageVersion=${{ github.ref_name }}
if: "!github.event.release.prerelease"
- name: Publish
run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_KEY }} --skip-duplicate -s https://api.nuget.org/v3/index.json