Guard cli-post-release on cli-release success for the same tag#2854
Open
mikeland73 wants to merge 1 commit into
Open
Guard cli-post-release on cli-release success for the same tag#2854mikeland73 wants to merge 1 commit into
mikeland73 wants to merge 1 commit into
Conversation
cli-post-release runs on the `released` event and promotes the tag to stable in S3. That event can fire even when cli-release failed partway (or a release is published by other means), so gate the publish job on a check that the cli-release workflow for the same commit actually succeeded, using int128/wait-for-workflows-action. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cli-post-releaseruns on the GitHubrelease: [released]event and promotes the tag tostablein S3. That event can fire even whencli-releasefailed partway (or a release was published by other means), which would promote a broken build.This adds a
check-releasegate job (whichpublishnowneeds:) that waits for thecli-releaseworkflow run for the same commit to finish and fails if it did not succeed, usingint128/wait-for-workflows-action.Notes
sha: ${{ github.sha }}— on thereleaseevent this is the tag's commit, matching the SHAcli-releaseran on.filter-workflow-events: push— overrides the action's default (current event =release);cli-releaseis triggered by the tag push.filter-workflow-names: cli-release— waits only on that workflow.The common case (tests fail →
releasejob skipped → no release published) already never fires the event; this guard covers the partial-failure / externally-published edge cases.🤖 Generated with Claude Code