ci(publish): tag-driven publish with semver validation and auto-releases - #42
Merged
Conversation
The publish workflow now treats the pushed tag as the source of truth for the release version. A validate job rejects tags that are not strict vMAJOR.MINOR.PATCH semver, do not sort above every existing release tag, or point at commits not on main. The publish job syncs package.json and public/manifest.json to the tag version in the build workspace before building (scripts/set-version.cjs, also exposed as pnpm set-version), runs the test suite, and verifies the version baked into app.zip before uploading to the Chrome Web Store. A release job mirrors the tag's CHANGELOG.md section into a GitHub release so releases stop lagging tags, and a sync-versions job opens a PR when the repo files lagged the tag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Jared Scott <jared.scott@variable.team>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Jared Scott <jared.scott@variable.team>
Coverage ReportSummary
|
Signed-off-by: Jared Scott <jared.scott@variable.team> # Conflicts: # docs/KNOWLEDGE_BASE.md
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.
PR checklist
What type of PR is this?
ci
What this PR does / why we need it:
Publishing is kicked off by pushing a git tag, and this PR makes the tag the actual source of truth instead of just a trigger. Today the workflow builds whatever the tag points at and fails if versions mismatch; nothing stops a non-semver tag, a tag lower than what's already shipped, or a tag on a side branch, and GitHub releases have to be written by hand (which is why 3.0.0 through 4.0.0 had none until this week).
The reworked publish-extension.yml runs four jobs:
pnpm set-version), runs the test suite, builds, checks the version actually baked into app.zip against the tag, then uploads to the Chrome Web Store exactly as before.docs/development.md, CLAUDE.md, and AGENTS.md are updated to describe the new flow.
Which issue(s) this PR fixes:
n/a
Special notes for your reviewer:
set-version.cjs rewrites only the version value with a targeted replacement rather than JSON.stringify, so file formatting (like the inline permissions array) survives byte-for-byte; verified by a set/unset round trip leaving no diff. The awk changelog extraction and the sort -V ordering were tested locally against the real CHANGELOG. One known caveat, noted in the sync PR body: PRs opened with the Actions token don't trigger CI, so a drift-sync PR needs an empty commit or a close/reopen to get checks.
The store upload step and its four secrets are untouched.
Does this PR introduce a user-facing change?:
NONE