Use managed identity for signing #1
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: xUnit.net Analyzers CI Build (signed) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'rel/**' | |
| workflow_dispatch: | |
| jobs: | |
| deployment: | |
| name: "Build" | |
| runs-on: windows-latest | |
| environment: signing | |
| env: | |
| DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE: true | |
| DOTNET_NOLOGO: true | |
| steps: | |
| - name: Clone source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Install .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| - name: Get .NET information | |
| run: dotnet --info | |
| - name: Login to Azure CLI | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ vars.KEYVAULT_APP_ID }} | |
| tenant-id: ${{ vars.KEYVAULT_TENANT_ID }} | |
| subscription-id: ${{ vars.KEYVAULT_SUBSCRIPTION_ID }} | |
| - name: "Build target: BuildAll" | |
| run: dotnet run --project tools/builder --no-launch-profile -- BuildAll --timing | |
| - name: "Build target: PublishPackages" | |
| env: | |
| PUSH_APIKEY: ${{ secrets.FEEDZ_PUSH_KEY }} | |
| PUSH_URI: ${{ vars.FEEDZ_PUSH_URL }} | |
| SIGN_APP_ID: ${{ vars.KEYVAULT_APP_ID }} | |
| SIGN_CERT_NAME: ${{ vars.KEYVAULT_CERT_NAME }} | |
| SIGN_TIMESTAMP_URI: ${{ vars.KEYVAULT_TIMESTAMP_URL }} | |
| SIGN_VAULT_URI: ${{ vars.KEYVAULT_URL }} | |
| run: dotnet run --project tools/builder --no-launch-profile -- PublishPackages --timing | |
| - name: "Upload artifact: test" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test | |
| path: artifacts/test | |
| compression-level: 9 | |
| if: always() | |
| - name: "Upload artifact: packages" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages | |
| path: artifacts/packages | |
| compression-level: 0 | |
| if: always() | |
| - name: Publish Test Report | |
| uses: ctrf-io/github-test-reporter@v1 | |
| with: | |
| report-path: './artifacts/test/*.ctrf' | |
| github-report: true | |
| if: always() |