Optimize allocations and enhance performance for PackageUrl handling in .NET 8.0 #220
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: Build & Upload | |
| on: | |
| push: | |
| branches: [master] | |
| tags: "*" | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| Build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| - name: Build & Test | |
| run: | | |
| dotnet test --configuration Release | |
| dotnet pack --no-restore --configuration Release | |
| - name: Attach NuGet Packages | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: nuget | |
| path: | | |
| nuget | |
| Publish: | |
| if: github.event_name == 'push' && github.ref_type == 'tag' | |
| needs: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - name: Download NuGet Packages | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: nuget | |
| path: nuget | |
| - name: NuGet Login | |
| uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1 | |
| id: nuget-login | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Release & Publish to nuget.org | |
| run: | | |
| echo 'Creating Release ${{ github.ref_name }}' | |
| gh release create '${{ github.ref_name }}' ./nuget/* --target '${{ github.sha }}' --generate-notes | |
| dotnet nuget push "nuget/*.nupkg" --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |