From 600d1988f1a2ab6987b75560a15c0b3f24409710 Mon Sep 17 00:00:00 2001 From: Steve Ives Date: Fri, 6 Nov 2026 09:14:21 -0800 Subject: [PATCH] Make PR builds cheaper in CI. Skip AzureSignTool install, signing and MSI artifact upload on pull_request runs; they remain on pushes to master. Add a concurrency group so a new push to a PR cancels its stale build, while master builds are never cancelled. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31733ff..6a4e640 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,12 @@ on: - master pull_request: +# Cancel a superseded PR build when new commits are pushed to the same PR. +# Never cancel a master build, so a release build is not dropped by a later merge. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: build: runs-on: windows-latest @@ -27,6 +33,7 @@ jobs: dotnet-version: '10.x' - name: Install AzureSignTool + if: github.event_name == 'push' run: dotnet tool install --global AzureSignTool - name: Restore NuGet packages @@ -66,6 +73,7 @@ jobs: /p:PublishReadyToRun=true - name: Sign executables + if: github.event_name == 'push' env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_APPLICATION_ID: ${{ secrets.AZURE_APPLICATION_ID }} @@ -134,6 +142,7 @@ jobs: shell: pwsh - name: Sign MSI + if: github.event_name == 'push' env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_APPLICATION_ID: ${{ secrets.AZURE_APPLICATION_ID }} @@ -159,6 +168,7 @@ jobs: } - name: Upload MSI artifact + if: github.event_name == 'push' uses: actions/upload-artifact@v4 with: name: MSI