v1.0.0 #15
Workflow file for this run
This file contains hidden or 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 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" |