VbaCompiler and vbamc release v2.0.1 #22
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: | |
| push: | |
| tags: [ 'v*.*.*' ] | |
| permissions: | |
| id-token: write | |
| attestations: write | |
| contents: write | |
| env: | |
| DOTNET_NOLOGO: 1 | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_GENERATE_ASPNET_CERTIFICATE: 0 | |
| ContinuousIntegrationBuild: true | |
| RestoreLockedMode: true | |
| Configuration: Release | |
| RepositoryBranch: '${{ github.ref_name }}' | |
| RepositoryCommit: '${{ github.sha }}' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: production | |
| url: https://www.nuget.org/packages/NetOfficeFw.VbaCompiler | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: setup dotnet | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8 | |
| 10 | |
| - name: restore | |
| run: dotnet restore | |
| - name: build | |
| run: dotnet build --no-restore | |
| - name: test | |
| run: dotnet test --no-build --no-restore | |
| - name: pack | |
| run: | | |
| dotnet pack src/VbaCompiler/VbaCompiler.csproj --no-build --no-restore -o dist | |
| dotnet pack src/vbamc/vbamc.csproj --no-build --no-restore -o dist | |
| - name: attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-path: 'dist/*.nupkg' | |
| show-summary: true | |
| - name: publish artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vbamc_packages | |
| path: | | |
| ${{ github.workspace }}/dist | |
| ${{ github.workspace }}/src/VbaCompiler/README.md | |
| ${{ github.workspace }}/src/vbamc/README.md | |
| - name: authenticate nuget.org | |
| uses: NuGet/login@v1 | |
| id: nuget | |
| with: | |
| user: ${{ vars.NUGET_PUSH_USER }} | |
| - name: publish | |
| working-directory: '${{ github.workspace }}/dist' | |
| run: | | |
| dotnet nuget push "*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json | |
| env: | |
| NUGET_API_KEY: ${{ steps.nuget.outputs.NUGET_API_KEY }} | |
| - name: release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ !cancelled() && startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: 'vbamc ${{ github.ref_name }}' | |
| body_path: ${{ github.workspace }}/RELEASE_NOTES.md |