Repository navigation
fix(release): check the release tag before creating a draft - #204
Merged
Merged
Conversation
## What/Why The "Check release tag" step ran after release-drafter had already created the draft. When the tag existed at another commit, the job failed but left an orphan draft behind. A new "Resolve release tag" step now runs the same pinned release-drafter action with dry-run: true. The tag check reads that step's tag_name and runs before the real "Draft release" step. The draft step itself is unchanged, so later steps and job outputs still read steps.release-drafter.outputs.*. Applied to release-draft.yaml (used by every variant) and to the consolidated release.yaml. Fixes #202 ## Proof it works release-drafter v7.7.0 (34d8067) sets tag_name in dry-run mode. upsertRelease returns undefined when dryRun is set, and setActionOutput falls back to the payload tag (src/actions/drafter/config/set-action-output.ts lines 26 and 39). shellcheck, bats (31 ok), the inline-copy drift check, actionlint, and pre-commit all pass locally. ## Risk Low. Step order changes in one job, and the extra step is read-only. Each release run makes one more set of read API calls. ## AI role Claude Opus 5.5 wrote the change. A human reviews it. ## Review focus - Both release-drafter steps take identical inputs, so the dry-run tag matches the tag the real draft uses. Signed-off-by: jmeridth <jmeridth@gmail.com>
zkoppert
approved these changes
Oct 1, 2026
1 task done
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.
Fixes #202
Pull Request
Proposed Changes
The tag check now runs before release-drafter writes anything, so a run that fails on an existing tag no longer leaves an orphan draft.
dry-run: trueto gettag_name.steps.release-drafter.outputs.*.The change is in
release-draft.yaml, which every variant calls, and in the consolidatedrelease.yaml, which had the same ordering.Proof it works
34d8067) setstag_namein dry-run mode.upsertReleasereturnsundefinedwhendryRunis set.setActionOutputthen falls back to the payload tag (set-action-output.ts lines 26 and 39). The bundleddist/actions/drafter/run.jshas the same logic.shellcheck scripts/*.sh,bats scripts/tests/(31 ok), the inline-copy drift check fromtest-scripts.yaml,actionlint, andpre-commit run --all-filesall pass.Risk
Low. The change reorders steps in one job, and the new step is read-only. Each release run makes one extra set of read API calls.
AI role
Claude Opus 5.5 wrote the change. A human reviews it.
Review focus
Readiness Checklist
Author/Contributor