Release #25
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: Release | |
| on: | |
| release: | |
| types: [published] | |
| # push: | |
| # tags: | |
| # - '*.*.*' | |
| jobs: | |
| build: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| attestations: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 6.0 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Setup .NET 7.0 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '7.0.x' | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Setup .NET 9.0 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test --configuration Release --no-build --verbosity normal | |
| - name: Pack | |
| run: dotnet pack --configuration Release --output ./package | |
| - name: Attest Build Provenance | |
| uses: actions/[email protected] | |
| with: | |
| subject-path: '${{ github.workspace }}/package' | |
| - name: Push to github | |
| run: dotnet nuget push ./package/*.nupkg --source https://nuget.pkg.github.com/cadabra/index.json --api-key ${{ secrets.RECURRENCE_API_KEY }} | |
| - name: Push to NuGet | |
| run: dotnet nuget push ./package/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate |