Skip to content

v1.0.0-beta

v1.0.0-beta #12

Workflow file for this run

name: Publish to NuGet
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # needed to upload artifacts to the release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- run: dotnet restore
- run: dotnet build -c Release --no-restore
- run: dotnet pack -c Release --no-build
- name: Push to NuGet
run: |
dotnet nuget push **/*.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ secrets.NUGET_API_KEY }} \
--skip-duplicate
- name: Upload nupkg to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: "**/*.nupkg"