From 53f4d69bf071beb84fe1bd3b247fec94a302b986 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Sun, 26 Apr 2026 14:28:05 +0200 Subject: [PATCH 1/5] Speed up nupkg artifact upload --- .github/workflows/release.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 666bb0cb845..9f5f54a676b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,16 +66,6 @@ jobs: echo "is_active_major=$IS_ACTIVE_MAJOR" >> "$GITHUB_OUTPUT" echo "is_highest_stable_major=$IS_HIGHEST_STABLE_MAJOR" >> "$GITHUB_OUTPUT" - { - echo "## Release context" - echo "- git_tag: \`$GIT_TAG\`" - echo "- major: \`$MAJOR\`" - echo "- is_stable: \`$IS_STABLE\`" - echo "- is_active_major: \`$IS_ACTIVE_MAJOR\`" - echo "- is_highest_stable_major: \`$IS_HIGHEST_STABLE_MAJOR\`" - echo "- highest_stable_major (registry): \`$HIGHEST\`" - } >> "$GITHUB_STEP_SUMMARY" - create-draft: name: 📝 Create Draft Release runs-on: ubuntu-22.04 @@ -181,11 +171,7 @@ jobs: - name: 📤 Attach .nupkg assets to GitHub release shell: bash run: | - set -euo pipefail - for file in ./output/packages/*.nupkg; do - echo "📤 Uploading $file" - gh release upload ${{ env.GIT_TAG }} "$file" --repo "${{ github.repository }}" - done + gh release upload "$GIT_TAG" ./output/packages/*.nupkg --repo "${{ github.repository }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 40bcd187ecc860497d4734e5e2a352e53fd880e0 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Sun, 26 Apr 2026 14:28:14 +0200 Subject: [PATCH 2/5] Remove correlation-id --- .../dispatch-and-watch-workflow/action.yml | 66 +++++++------------ 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/.github/actions/dispatch-and-watch-workflow/action.yml b/.github/actions/dispatch-and-watch-workflow/action.yml index 8ca4a4e5792..33eca93f9d5 100644 --- a/.github/actions/dispatch-and-watch-workflow/action.yml +++ b/.github/actions/dispatch-and-watch-workflow/action.yml @@ -24,22 +24,14 @@ inputs: token: description: "Token with `actions: write` on the target repository." required: true - locate-attempts: - description: How many times to poll for the dispatched run before giving up. - required: false - default: "30" - locate-interval: - description: Seconds to wait between locate polls. - required: false - default: "5" outputs: run-id: description: Numeric ID of the dispatched run. - value: ${{ steps.locate.outputs.run-id }} + value: ${{ steps.dispatch.outputs.run-id }} run-url: description: HTML URL of the dispatched run. - value: ${{ steps.locate.outputs.run-url }} + value: ${{ steps.dispatch.outputs.run-url }} runs: using: composite @@ -57,41 +49,31 @@ runs: IS_ACTIVE_MAJOR: ${{ inputs.is_active_major }} run: | set -euo pipefail - CORR=$(uuidgen) - echo "correlation-id=$CORR" >> "$GITHUB_OUTPUT" - gh workflow run "$WORKFLOW" --repo "$REPO" --ref "$REF" \ - -f version="$VERSION" \ - -f is_stable="$IS_STABLE" \ - -f is_active_major="$IS_ACTIVE_MAJOR" \ - -f correlation_id="$CORR" + PAYLOAD=$(jq -n \ + --arg ref "$REF" \ + --arg version "$VERSION" \ + --arg is_stable "$IS_STABLE" \ + --arg is_active_major "$IS_ACTIVE_MAJOR" \ + '{ + ref: $ref, + return_run_details: true, + inputs: { + version: $version, + is_stable: $is_stable, + is_active_major: $is_active_major + } + }') - - name: 🔎 Locate dispatched run - id: locate - shell: bash - env: - GH_TOKEN: ${{ inputs.token }} - REPO: ${{ inputs.repo }} - WORKFLOW: ${{ inputs.workflow }} - CORR: ${{ steps.dispatch.outputs.correlation-id }} - ATTEMPTS: ${{ inputs.locate-attempts }} - INTERVAL: ${{ inputs.locate-interval }} - run: | - set -euo pipefail - RUN_ID="" - RUN_URL="" - for _ in $(seq 1 "$ATTEMPTS"); do - read -r RUN_ID RUN_URL < <(gh run list --repo "$REPO" --workflow "$WORKFLOW" \ - --limit 20 --json databaseId,name,url \ - --jq "[.[] | select(.name | contains(\"$CORR\"))][0] | \"\(.databaseId) \(.url)\"") - if [ -n "$RUN_ID" ] && [ "$RUN_ID" != "null" ]; then - break - fi - sleep "$INTERVAL" - done + RESPONSE=$(echo "$PAYLOAD" | gh api \ + -X POST "repos/$REPO/actions/workflows/$WORKFLOW/dispatches" \ + --input -) + + RUN_ID=$(echo "$RESPONSE" | jq -r '.workflow_run_id') + RUN_URL=$(echo "$RESPONSE" | jq -r '.html_url') if [ -z "$RUN_ID" ] || [ "$RUN_ID" = "null" ]; then - echo "::error::Could not locate dispatched run for $REPO ($WORKFLOW) with correlation_id=$CORR" + echo "::error::Dispatch did not return a run ID. Ensure the target host supports return_run_details." exit 1 fi @@ -104,5 +86,5 @@ runs: env: GH_TOKEN: ${{ inputs.token }} REPO: ${{ inputs.repo }} - RUN_ID: ${{ steps.locate.outputs.run-id }} + RUN_ID: ${{ steps.dispatch.outputs.run-id }} run: gh run watch "$RUN_ID" --repo "$REPO" --exit-status From 4a994a52ae71df313f6f6ffa7e013db8562bc585 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Sun, 26 Apr 2026 14:31:38 +0200 Subject: [PATCH 3/5] Simplify run id extraction --- .../dispatch-and-watch-workflow/action.yml | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/actions/dispatch-and-watch-workflow/action.yml b/.github/actions/dispatch-and-watch-workflow/action.yml index 33eca93f9d5..7aabb496446 100644 --- a/.github/actions/dispatch-and-watch-workflow/action.yml +++ b/.github/actions/dispatch-and-watch-workflow/action.yml @@ -50,33 +50,18 @@ runs: run: | set -euo pipefail - PAYLOAD=$(jq -n \ - --arg ref "$REF" \ - --arg version "$VERSION" \ - --arg is_stable "$IS_STABLE" \ - --arg is_active_major "$IS_ACTIVE_MAJOR" \ - '{ - ref: $ref, - return_run_details: true, - inputs: { - version: $version, - is_stable: $is_stable, - is_active_major: $is_active_major - } - }') + RUN_URL=$(gh workflow run "$WORKFLOW" --repo "$REPO" --ref "$REF" \ + -f version="$VERSION" \ + -f is_stable="$IS_STABLE" \ + -f is_active_major="$IS_ACTIVE_MAJOR") - RESPONSE=$(echo "$PAYLOAD" | gh api \ - -X POST "repos/$REPO/actions/workflows/$WORKFLOW/dispatches" \ - --input -) - - RUN_ID=$(echo "$RESPONSE" | jq -r '.workflow_run_id') - RUN_URL=$(echo "$RESPONSE" | jq -r '.html_url') - - if [ -z "$RUN_ID" ] || [ "$RUN_ID" = "null" ]; then - echo "::error::Dispatch did not return a run ID. Ensure the target host supports return_run_details." + if [ -z "$RUN_URL" ]; then + echo "::error::Dispatch did not return a run URL. Requires gh >= 2.87.0 against github.com." exit 1 fi + RUN_ID="${RUN_URL##*/}" + echo "run-id=$RUN_ID" >> "$GITHUB_OUTPUT" echo "run-url=$RUN_URL" >> "$GITHUB_OUTPUT" echo "Dispatched run: $RUN_URL" From 5f2d67c355ad707cc383f3cbcd4ece0bb7fcfeb2 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Sun, 26 Apr 2026 14:34:07 +0200 Subject: [PATCH 4/5] Compact output for gh run view --- .github/actions/dispatch-and-watch-workflow/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dispatch-and-watch-workflow/action.yml b/.github/actions/dispatch-and-watch-workflow/action.yml index 7aabb496446..e8039a2d14d 100644 --- a/.github/actions/dispatch-and-watch-workflow/action.yml +++ b/.github/actions/dispatch-and-watch-workflow/action.yml @@ -72,4 +72,4 @@ runs: GH_TOKEN: ${{ inputs.token }} REPO: ${{ inputs.repo }} RUN_ID: ${{ steps.dispatch.outputs.run-id }} - run: gh run watch "$RUN_ID" --repo "$REPO" --exit-status + run: gh run watch "$RUN_ID" --repo "$REPO" --exit-status --compact From 3c5dd90cf03215ac10c8409fec2726a597a1677b Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Sun, 26 Apr 2026 14:55:56 +0200 Subject: [PATCH 5/5] Do not update homebrew for unstable past release versions --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f5f54a676b..5845b5f1b8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -611,6 +611,7 @@ jobs: name: 🍺 Update Homebrew Tap runs-on: ubuntu-latest needs: [compute-release-context, publish-release] + if: needs.compute-release-context.outputs.is_stable == 'true' || needs.compute-release-context.outputs.is_active_major == 'true' steps: - name: 📦 Checkout