Fix TaskCompletionSource race condition #7
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: | |
| push: | |
| tags: | |
| - 'v*' # Triggers on tags like v1.0.0, v1.0.0.0, v1.0, etc. | |
| env: | |
| CONFIGURATION: 'Release' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Extract version from tag | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG_NAME#v} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Extracted version: $VERSION" | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore /p:Version=${{ env.VERSION }} | |
| - name: Test | |
| run: dotnet test --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal | |
| - name: Pack | |
| run: dotnet pack --configuration ${{ env.CONFIGURATION }} --no-build --output nupkgs /p:PackageVersion=${{ env.VERSION }} | |
| - name: Publish to NuGet | |
| run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages | |
| path: nupkgs/*.nupkg |