Version 1.4.1 #1
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: Upload NuGet package | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore signing key | |
| env: | |
| SIGNING_KEY: ${{ secrets.VS_SIGNING_KEY }} | |
| run: | | |
| echo $SIGNING_KEY | base64 --decode > src/Otp.NET/vs-signing-key.snk | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Publish to nuget.org | |
| run: dotnet nuget push src/Otp.NET/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: otpnet-nuget-package | |
| path: src/Otp.NET/bin/Release/*.nupkg |