fix: self-bootstrap the release workflow on a tagless repo#21
Merged
Conversation
semver-action calls GitHub's compare-two-commits API against a baseline tag; on a repo with no tags it 404s and the workflow crashes (which is what happened on the first merge). Skip semver-action when no tag exists yet and start at v1.0.0; once a tag is present, use it to size the bump from conventional commits (feat/fix/BREAKING, patch fallback). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
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
Rework the
Releaseworkflow so it no longer crashes on the first merge, while keeping conventional-commit-driven versioning.Why it failed
The first merge to
masterran the workflow andietf-tools/semver-actioncrashed with a404 Not Foundon the compare-two-commits API (failed run). The action needs an existing tag to diffmasteragainst; this repo had zero tags, so there was nothing to compare and it errored out.fallbackTagonly supplies a version string — it doesn't create that baseline.Fix
Self-bootstrap:
v1.0.0.feat→minor,fix→patch,BREAKING CHANGE→major; patch fallback so every merge still ships a release).Then build →
pnpm pack→ attachexpost-<version>.tgzto the release, same as before.Result
Merging this cuts
v1.0.0(the repo is still tagless) withexpost-1.0.0.tgzattached, which unblocks beeminder/blog#762. Every later merge auto-releases with a conventional-commit-sized version.🤖 Generated with Claude Code