Skip to content

ci: keep beta on the promoted version, and give the announce job a checkout - #238

Merged
twk3 merged 5 commits into
mainfrom
claude/adoring-noether-6sagka
Oct 14, 2026
Merged

twk3 merged 5 commits into
mainfrom
claude/adoring-noether-6sagka

Conversation

@twk3

@twk3 twk3 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

2.7.0 is on latest. The promotion worked once a trusted publisher configuration naming promote.yaml existed — those are keyed on the workflow filename, so the entry covering publish.yaml authorized nothing here. That was the whole of the E401.

Three changes, each from something that run showed.

Promotion leaves beta alone

beta stays on the version just promoted. Every publish to that channel sets the tag, so it cannot go stale; between releases beta and latest simply name the same version.

It also makes the step idempotent by construction. dist-tag add sets a tag to the version it already holds without complaint, so a promotion that failed partway can be dispatched again — which the 2.7.0 run could not, because dist-tag rm beta errors once beta is gone. The conditional that existed to work around that is gone with the removal it guarded.

One wart worth naming: publishing a version straight to latest (which publish.yaml allows) would leave beta behind latest until the next beta publish. Visible, not harmful — @beta would just resolve to an older version than @latest, which is an accurate description of what exists.

The announce job needs a checkout

linear-release exits before doing anything when there is no .git directory, whichever command it is given — complete needs a working tree even though it scans no commits:

Error: linear-release must run inside a git repository, but no `.git` directory was found.

That is my error from #237: I wrote that complete needs no checkout, when what I had established was only that the action's README omits one from its complete example. The job now checks out at the fetch-depth its quick start documents.

The 2.7.0 release is consequently still open in Linear with nothing posted to Slack, and needs closing by hand.

Withdrawn: the setup-node change this PR originally made

I had removed registry-url on the theory that the _authToken line setup-node writes preempts the OIDC exchange (actions/setup-node#1551). The successful run disproves it: it ran with registry-url set and exchanged an OIDC credential anyway. publish.yaml had been publishing that way all along, which I noted as an unexplained contradiction at the time instead of treating it as the answer. The npmrc guard went with it — with registry-url restored it would fail every run on the token setup-node writes.

What survives from that work is the error message, now naming the real cause, and RELEASE.md, which described one trusted publisher configuration per package when there is one per workflow file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz

`registry-url` makes setup-node write `_authToken=${NODE_AUTH_TOKEN}` to the
job's npmrc. Nothing sets that variable now, so npm read a credential, treated
auth as configured, skipped the exchange and sent the placeholder:
"Unable to authenticate, your authentication token seems to be invalid"
(actions/setup-node#1551). registry.npmjs.org is the default, so dropping the
input changes nothing else.

A token reaching the npmrc again fails the job naming the file, rather than
reappearing as a 401 from the registry.

The dist-tag failure now says a configuration has to name this workflow file:
they are keyed on the filename and grant dist-tag per configuration, so the one
covering publish.yaml authorizes nothing here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz
@baz-reviewer

baz-reviewer Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review this PR on Baz

Baz Summary

Update the promotion workflow to retain the beta tag on the promoted version and improve its trusted-publishing guidance. Add the required checkout for linear-release so Linear completion and Slack announcement can run from a Git repository.

Topics

TopicDetails
Announce release Check out the repository before invoking linear-release, enabling the release completion and announcement flow to operate successfully.
Modified files (1)
  • .github/workflows/promote.yaml
Latest Contributors(2)
UserCommitDate
noreply@anthropic.comci: keep the checkout ...October 14, 2026
agoldis@gmail.comchore: update Node.js ...January 27, 2026
Promote release tags Keep beta assigned to the promoted version, make promotion reruns idempotent, and clarify workflow-specific npm trusted publisher permissions and required credentials handling.
Modified files (2)
  • .github/workflows/promote.yaml
  • RELEASE.md
Latest Contributors(2)
UserCommitDate
noreply@anthropic.comci: keep the checkout ...October 14, 2026
gimenez.maxi@gmail.comchore: add slack notif...May 28, 2026

Merger  Activate to get a short verdict whether this PR is good to go or not

Skills  Activate Skill Maintainer to keep your skills up to date

Planner  This PR would have been improved with Baz Planner - Try it now

linear-release exits before doing anything when there is no `.git` directory,
whichever command it is given: `complete` needs a working tree even though it
scans no commits. The 2.7.0 promotion moved the tag and then failed here, so
the release stayed open in Linear with nothing posted.

That failure also had to be recoverable by dispatching again, and was not:
`dist-tag rm beta` errors once beta is gone, so a re-run died on the tag it
had already removed. Removing it is now conditional. Setting `latest` to the
version it already holds already succeeds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz
The 2.7.0 promotion ran with `registry-url` set and exchanged an OIDC
credential anyway, so the npmrc token setup-node writes does not preempt it on
npm 12.2.0. publish.yaml had been publishing that way all along, which said the
same thing before any of this.

Dropping it was a guess at an E401 that a missing trusted publisher
configuration explains: those are keyed on the workflow filename, and nothing
named promote.yaml existed yet.

The guard went with it. It only ever asserted the mechanism above, and with
registry-url restored it would fail every run on the token setup-node writes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz
@twk3 twk3 changed the title ci: stop setup-node writing a token that preempts the OIDC exchange ci: give the announce job a checkout, and let promote re-run Oct 14, 2026
Every publish to that channel sets the tag, so it cannot go stale: between
releases beta and latest name the same version. Not removing it also leaves
the step a single `dist-tag add`, which sets a tag to the version it already
holds without complaint, so a promotion that failed after the tag moved can be
dispatched again. The conditional that existed to make the removal re-runnable
goes with it.

The guide said promotion removes the tag, and still described one trusted
publisher configuration per package when there is one per workflow file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz
@twk3 twk3 changed the title ci: give the announce job a checkout, and let promote re-run ci: keep beta on the promoted version, and give the announce job a checkout Oct 14, 2026
Comment thread .github/workflows/promote.yaml
checkout writes GITHUB_TOKEN into the clone's config by default, where any
later step in the job can read it. In announce those steps are linear-release
and slack-github-action, both on mutable major tags, which is what putting
them in their own job was meant to avoid.

Neither job runs git after checking out, so nothing needs the credential. Set
on both checkouts rather than the flagged one: the same default applies to the
clone the promotion runs in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4EZAEvxLfXuMeNz5ZgCMz
@twk3
twk3 merged commit f8d2fa8 into main Oct 14, 2026
4 checks passed
@twk3
twk3 deleted the claude/adoring-noether-6sagka branch October 14, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants