Repository navigation
ci: keep beta on the promoted version, and give the announce job a checkout - #238
Merged
Merged
Conversation
`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
|
| Topic | Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Announce release | Check out the repository before invoking linear-release, enabling the release completion and announcement flow to operate successfully.Modified files (1)
Latest Contributors(2)
| |||||||||
| 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)
Latest Contributors(2)
|
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
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
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
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.
2.7.0 is on
latest. The promotion worked once a trusted publisher configuration namingpromote.yamlexisted — those are keyed on the workflow filename, so the entry coveringpublish.yamlauthorized nothing here. That was the whole of the E401.Three changes, each from something that run showed.
Promotion leaves
betaalonebetastays on the version just promoted. Every publish to that channel sets the tag, so it cannot go stale; between releasesbetaandlatestsimply name the same version.It also makes the step idempotent by construction.
dist-tag addsets 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, becausedist-tag rm betaerrors oncebetais 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(whichpublish.yamlallows) would leavebetabehindlatestuntil the next beta publish. Visible, not harmful —@betawould just resolve to an older version than@latest, which is an accurate description of what exists.The announce job needs a checkout
linear-releaseexits before doing anything when there is no.gitdirectory, whichever command it is given —completeneeds a working tree even though it scans no commits:That is my error from #237: I wrote that
completeneeds no checkout, when what I had established was only that the action's README omits one from itscompleteexample. The job now checks out at thefetch-depthits 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-urlon the theory that the_authTokenline setup-node writes preempts the OIDC exchange (actions/setup-node#1551). The successful run disproves it: it ran withregistry-urlset and exchanged an OIDC credential anyway.publish.yamlhad 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 — withregistry-urlrestored 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