Skip to content

ci(release): mint v* tags by App and guard publish.yml (RIG-4983) - #4

Merged
mattwilkinsonn merged 1 commit into
mainfrom
forge/rig-4983-release-mint
Oct 11, 2026
Merged

mattwilkinsonn merged 1 commit into
mainfrom
forge/rig-4983-release-mint

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds App-minted release tags to @rigelbuild/solid-markdown and guards publish.yml (fork-releases T7). This fork is owned and releases from main.

Changes

  • scripts/release-tag.ts, Bun:
    • check (pull request): if the package.json version changed, it must have the owned shape X.Y.Z or X.Y.Z-rc.N and be strictly greater than the latest v* tag, by semver order (rc.N comes before GA).
    • mint (push to main or dispatch): an existing v<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 on origin/main, and package.json at the SHA must equal the tag.
  • .github/workflows/release-tag.yaml: a check job on pull requests and a mint job in environment main, using the rigelbuild-automation App token (contents: write, this repo only).
  • publish.yml:
    • It publishes only on a tag push, after resolve.
    • It checks out the resolved SHA, and the npm dist-tag comes from the resolved version (prerelease → next).
    • A dispatch publishes nothing.
  • test/release-tag.test.ts: 12 scratch-repo cases with a gh stub, run by bun run test, so CI runs them.

Tests

  • bun run lint, bun run typecheck and bun run test pass: 11 client, 20 SSR and 12 release-tag tests.
  • actionlint is clean. zizmor flags only the existing ci.yml checkout and the npm trusted-publishing note.
  • Red checks: setting the mint target to the tip fails the oldest-commit case, and dropping the ancestry check fails the non-ancestor case.
  • With a failing gh stub on PATH, mint at main prints Tag v3.0.0-rc.0 already exists; nothing to mint. and exits 0.

After merge

The main environment with the App secrets comes from orion #3919 (applying in pipeline 41313). Once it exists, a workflow_dispatch from main should be a no-op on v3.0.0-rc.0, which proves the token step.

Refs RIG-4983

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>
@linear-code

linear-code Bot commented Oct 10, 2026

Copy link
Copy Markdown

RIG-4983

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review October 10, 2026 22:46
@mattwilkinsonn
mattwilkinsonn merged commit 7b1fd89 into main Oct 11, 2026
3 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the forge/rig-4983-release-mint branch October 11, 2026 02:39
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.

2 participants