Skip to content

Commit 3443962

Browse files
ci(release): dispatch recompile-safe-output-fixtures after asset upload (#911)
Releases published via release-please use the default GITHUB_TOKEN, which GitHub Actions actively suppresses from triggering other workflows to avoid recursive runs. As a result, the recompile-safe-output-fixtures workflow's release: published trigger has never fired (v0.32.0 and v0.33.0 both went unhandled). Add a final job at the end of release.yml that explicitly dispatches the recompile workflow once binaries and checksums are uploaded, using GH_AW_CI_TRIGGER_TOKEN so the dispatched run can itself open a PR. The tag is passed explicitly to avoid races against a hypothetical newer release landing mid-run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fdd50e2 commit 3443962

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,30 @@ jobs:
186186
run: |
187187
TAG="${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"
188188
gh release upload "$TAG" checksums.txt --clobber --repo "${{ github.repository }}"
189+
190+
trigger-recompile-safe-output-fixtures:
191+
name: Trigger safe-output fixture recompile
192+
needs: [release-please, checksums]
193+
# Run only once all release assets (binaries + checksums.txt) are uploaded.
194+
# Releases published via release-please use the default GITHUB_TOKEN, which
195+
# does NOT fire the `release: published` event on other workflows (GitHub
196+
# actively suppresses this to prevent recursive triggers). Dispatch the
197+
# recompile workflow explicitly here using a PAT so the dispatched run can
198+
# itself open a PR.
199+
if: >-
200+
always() &&
201+
(needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch') &&
202+
needs.checksums.result == 'success'
203+
runs-on: ubuntu-22.04
204+
steps:
205+
- name: Dispatch recompile-safe-output-fixtures
206+
env:
207+
GITHUB_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }}
208+
run: |
209+
set -euo pipefail
210+
TAG="${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"
211+
echo "Dispatching recompile-safe-output-fixtures for $TAG"
212+
gh workflow run recompile-safe-output-fixtures.lock.yml \
213+
--repo "${{ github.repository }}" \
214+
--ref main \
215+
-f "version=$TAG"

0 commit comments

Comments
 (0)