NetOffice Build Tasks v2.1.0 #2
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: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: windows-2022 | |
| env: | |
| Configuration: 'Release' | |
| VersionSuffix: '' | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8 | |
| - name: setup msbuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: azure login | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.TRUSTED_SIGNING_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: setup dotnet sign | |
| run: dotnet tool install --tool-path . --prerelease sign | |
| - name: build | |
| run: dotnet build -c ${{ env.Configuration }} | |
| - name: pack | |
| run: dotnet pack --no-build --no-restore src/NetOfficeFw.Build.csproj -c ${{ env.Configuration }} -o dist | |
| - name: sign | |
| run: > | |
| ./sign code trusted-signing | |
| **/*.nupkg | |
| --base-directory "${{ github.workspace }}/dist" | |
| --publisher-name "NetOffice" | |
| --description "NetOffice Build Tasks" | |
| --description-url "https://github.com/NetOfficeFw/BuildTasks/" | |
| --trusted-signing-endpoint "https://weu.codesigning.azure.net/" | |
| --trusted-signing-account "OpenSourceSigning" | |
| --trusted-signing-certificate-profile "JozefIzsoOpenSourceProfile" | |
| - name: publish package | |
| if: success() | |
| run: dotnet nuget push *.nupkg --api-key $env:NUGET_TOKEN --source https://api.nuget.org/v3/index.json | |
| working-directory: '${{ github.workspace}}\dist' | |
| env: | |
| NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} |