Repository navigation
Release when a merge into main changes the gem version - #5
Merged
Merged
Conversation
A release took a merge, a hand-pushed tag, and an approval. The Release workflow now starts on a push to main that changes lib/hegel/version.rb. A check job stops the run when the tag for that version exists. The publish job waits for the release environment approval as before. The last job creates the tag on the merged commit together with the GitHub release. A tag that the workflow pushed with its own token would not start another workflow, so the tag is the last thing created, after the gems are out. A rejected approval leaves no tag, and a rerun of the run releases the same commit. ADR 0024 records the decision. Co-Authored-By: Claude Opus 5.5 <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.
A release now takes one merge and one approval.
The Release workflow starts on a push to
mainthat changeslib/hegel/version.rb:v<version>. When the tag exists, as after a revert, the run stops.releaseenvironment approval, then builds and pushes the gems from the merged commit, as before.gh release create --target).A tag pushed with the workflow's own token would not start another workflow, so the tag comes last, after the gems are out. A rejected approval leaves no tag, and rerunning the run releases the same commit. ADR 0024 records the decision.
Checked locally: the check step prints "v0.2.0 already exists" for 0.2.0 and
tag=v0.2.1for the 0.2.1 in #4. The workflow itself first runs on the next merge that changes the version. Merge this before #4, so that merging #4 starts the 0.2.1 release.🤖 Generated with Claude Code