Skip to content

fix: self-bootstrap the release workflow on a tagless repo#21

Merged
narthur merged 1 commit into
masterfrom
fix/release-tag-bump
Jul 15, 2026
Merged

fix: self-bootstrap the release workflow on a tagless repo#21
narthur merged 1 commit into
masterfrom
fix/release-tag-bump

Conversation

@narthur

@narthur narthur commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

Rework the Release workflow so it no longer crashes on the first merge, while keeping conventional-commit-driven versioning.

Why it failed

The first merge to master ran the workflow and ietf-tools/semver-action crashed with a 404 Not Found on the compare-two-commits API (failed run). The action needs an existing tag to diff master against; this repo had zero tags, so there was nothing to compare and it errored out. fallbackTag only supplies a version string — it doesn't create that baseline.

Fix

Self-bootstrap:

  • No tags yet → skip semver-action and start at v1.0.0.
  • A tag exists → run semver-action to size the bump from conventional commits since the last tag (feat→minor, fix→patch, BREAKING CHANGE→major; patch fallback so every merge still ships a release).

Then build → pnpm pack → attach expost-<version>.tgz to the release, same as before.

Result

Merging this cuts v1.0.0 (the repo is still tagless) with expost-1.0.0.tgz attached, which unblocks beeminder/blog#762. Every later merge auto-releases with a conventional-commit-sized version.

🤖 Generated with Claude Code

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>
@narthur
narthur merged commit cc7b8ff into master Jul 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant