ci(release): mirror npm publish to @shep.bot scope#598
Closed
arielshad wants to merge 1 commit into
Closed
Conversation
Mirrors every npm publish (dev prerelease + production stable release) to a second scope, @shep.bot/cli, alongside the canonical @shepai/cli. Fully additive and backward compatible — existing users keep installing @shepai/cli unchanged. The mirror is also a hedge against the current dev-release outage (the primary @shepai npm token was revoked sometime between 14:57 and 17:00 today, blocking all dev releases until rotated). Two changes in .github/workflows/ci.yml: 1. New parallel job dev-release-shepbot, runs on PRs with the same needs: list as dev-release. Uses a separate secret NPM_TOKEN_SHEPBOT, swaps the package name in-job via npm pkg set, publishes with --tag dev. continue-on-error: true at the job level keeps it from blocking PR merges while the new token / org settle. Posts its own PR comment with comment-tag dev-release-shepbot so it does not collide with the existing @shepai PR comment. 2. Final mirror step in the existing release job. Captures the pre-release version, runs semantic-release as today, then mirror- publishes if and only if the version actually bumped (so PRs that merge with no releasable changes do not re-publish). Uses continue-on-error so a failed mirror does not break the canonical release. Both publish paths guard against an unset NPM_TOKEN_SHEPBOT secret with a warning + clean exit, so the workflow does not break on first run before the secret is configured. Required follow-up (manual, not in this PR): - generate a granular npm token with publish access to the @shep.bot org on npmjs.com - add it to repo secrets as NPM_TOKEN_SHEPBOT - separately rotate NPM_TOKEN to fix the canonical @shepai/cli outage Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Contributor
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
Mirrors every npm publish (dev prerelease + production stable release) to a second scope,
@shep.bot/cli, alongside the canonical@shepai/cli. Fully additive and backward compatible — existing users keep installing@shepai/cliunchanged.This is also a hedge against the current dev-release outage (the primary
NPM_TOKENwas revoked sometime between 14:57 and 17:00 UTC on 2026-05-03, blocking all dev releases until rotated). With this PR, even when one token misbehaves, the other keeps publishing.What changed
.github/workflows/ci.yml— purely additive (111 inserts, 0 deletes):New parallel job
dev-release-shepbot(PRs only)needs:list asdev-release, runs in parallel.NPM_TOKEN_SHEPBOT.npm pkg set name='@shep.bot/cli', then publishes with--tag dev.continue-on-error: trueat the job level — a misconfigured token cannot block PR merges.comment-tag: dev-release-shepbot(independent from the existing@shepaicomment).Final mirror step in the existing
releasejob (main pushes only)continue-on-error: true— a failed mirror does not break the canonical@shepai/clirelease.Both publish paths guard against an unset
NPM_TOKEN_SHEPBOTsecret with a warning + clean exit, so the workflow does not break on first run before the secret is configured.Required follow-up (not in this PR)
@shep.botorg.NPM_TOKEN_SHEPBOT.NPM_TOKENto fix the canonical@shepai/clioutage.Test plan
Dev Release (shep.bot mirror)check appears and passes (or warns + exits cleanly ifNPM_TOKEN_SHEPBOTis unset).Dev Releasecheck is unchanged.Releasejob runs the new mirror step and either publishes@shep.bot/cli@<version>or warns + exits cleanly.🤖 Generated with Claude Code