Repository navigation
ci(release): mint v* tags by App and guard publish.yml (RIG-4983) - #4
Merged
Merged
Conversation
The root package.json version is the release source, in the owned shape X.Y.Z or X.Y.Z-rc.N. A pull request that changes it must move past the latest tag. On main, the automation App mints v<version> at the commit that set it. publish.yml publishes only a tag push whose commit is on main and whose package.json matches the tag, and the npm dist-tag comes from that resolved version. Co-authored-by: Matt Wilkinson <matt@rigel.build>
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.
Summary
Adds App-minted release tags to
@rigelbuild/solid-markdownand guardspublish.yml(fork-releases T7). This fork is owned and releases frommain.Changes
scripts/release-tag.ts, Bun:check(pull request): if thepackage.jsonversionchanged, it must have the owned shapeX.Y.ZorX.Y.Z-rc.Nand be strictly greater than the latestv*tag, by semver order (rc.Ncomes before GA).mint(push tomainor dispatch): an existingv<version>is a no-op. Otherwise it creates the tag at the oldest first-parent commit that set the version. A 422 at the same target counts as success; a 422 at a different target fails.resolve <tag> <sha>: the shape must match, the SHA must be onorigin/main, andpackage.jsonat the SHA must equal the tag..github/workflows/release-tag.yaml: acheckjob on pull requests and amintjob in environmentmain, using therigelbuild-automationApp token (contents: write, this repo only).publish.yml:resolve.next).test/release-tag.test.ts: 12 scratch-repo cases with aghstub, run bybun run test, so CI runs them.Tests
bun run lint,bun run typecheckandbun run testpass: 11 client, 20 SSR and 12 release-tag tests.actionlintis clean.zizmorflags only the existingci.ymlcheckout and the npm trusted-publishing note.ghstub on PATH,mintatmainprintsTag v3.0.0-rc.0 already exists; nothing to mint.and exits 0.After merge
The
mainenvironment with the App secrets comes from orion #3919 (applying in pipeline 41313). Once it exists, aworkflow_dispatchfrommainshould be a no-op onv3.0.0-rc.0, which proves the token step.Refs RIG-4983