Skip to content

fix(boxel-cli): consolidate publish workflows, push annotated tags#4879

Merged
FadhlanR merged 1 commit into
mainfrom
fix-boxel-cli-publish-oidc-and-annotated-tags
May 19, 2026
Merged

fix(boxel-cli): consolidate publish workflows, push annotated tags#4879
FadhlanR merged 1 commit into
mainfrom
fix-boxel-cli-publish-oidc-and-annotated-tags

Conversation

@FadhlanR
Copy link
Copy Markdown
Contributor

@FadhlanR FadhlanR commented May 19, 2026

Summary

Run 26077192437 failed for two independent reasons, both fixed here:

  1. OIDC trusted-publisher mismatchboxel-cli-on-main.yml requested an OIDC token whose job_workflow_ref claim didn't match the npm trusted-publisher rule (registered for manual-boxel-cli-publish.yml). pnpm fell back to NODE_AUTH_TOKEN, which is empty because the package migrated to trusted publishing — npm returned 404 on the unauthenticated PUT.
  2. Lightweight tag never pushedgit tag "\$TAG" creates a lightweight tag; git push --follow-tags only pushes annotated tags. The tag stayed on the runner, and gh release create then failed with tag exists locally but has not been pushed.

This PR consolidates both publish flows into a single .github/workflows/boxel-cli-publish.yml with two jobs gated by github.event_name (so both share one trusted-publisher rule), and switches every git tag invocation to the annotated form git tag -a "\$TAG" -m "\$TAG".

Out-of-band action required

Before this PR's first post-merge run can publish, update the npm trusted-publisher rule:

  1. npmjs.com → @cardstack/boxel-cli → Settings → Trusted Publishers
  2. Edit the existing rule: change workflow filename from manual-boxel-cli-publish.yml to boxel-cli-publish.yml. Repo and environment fields unchanged.

The PR itself is safe to land before the rule is updated — the workflow only fires on merges to main, not PR pushes.

Recovery for the orphan 0.2.0-unstable.294

That version is on npm but has no git tag on origin and no GitHub Release. Recommended: skip — the next merge will produce 0.2.0-unstable.295 with a proper annotated tag and Release.

Test plan

  • yamllint passes locally on boxel-cli-publish.yml and boxel-cli-pr-title.yml (confirmed before commit).
  • After landing + npm rule update: merge any chore(boxel-cli): PR to main → workflow loads under new filename, compute-release short-circuits at npmBump=none, no publish attempted.
  • Next real fix(boxel-cli): or feat(boxel-cli): merge: push log shows both main -> main AND * [new tag] boxel-cli-v0.2.0-unstable.NNN -> boxel-cli-v0.2.0-unstable.NNN. OIDC token-exchange returns 200 (no "Skipped OIDC" warning). GitHub Release created with rich notes body. CHANGELOG.md updated.
  • First stable promotion via workflow_dispatch with confirm: promote: same OIDC success path, dist-tag latest, annotated stable tag pushed.

🤖 Generated with Claude Code

Run 26077192437 failed for two independent reasons:

1. The new `boxel-cli-on-main.yml` requested an OIDC token whose
   workflow filename didn't match the npm trusted-publisher rule
   (registered for `manual-boxel-cli-publish.yml`). pnpm fell back to
   `NODE_AUTH_TOKEN`, which is empty since the package migrated to
   trusted publishing — npm returned 404 on the unauthenticated PUT.
2. The "Commit, tag, and push" step created a lightweight tag with
   `git tag "$TAG"`. `git push --follow-tags` only pushes annotated
   tags, so the tag never reached origin and `gh release create` then
   failed with "tag exists locally but has not been pushed".

Consolidate both publish flows into a single `boxel-cli-publish.yml`
with two jobs gated by `github.event_name` so they share one
trusted-publisher rule, and switch every `git tag` to the annotated
form so `--follow-tags` actually pushes the tag.

Requires a one-time npm UI update: edit the @cardstack/boxel-cli
trusted-publisher rule to point at the new filename
`boxel-cli-publish.yml`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@FadhlanR FadhlanR marked this pull request as ready for review May 19, 2026 05:28
@FadhlanR FadhlanR merged commit 30b0083 into main May 19, 2026
28 checks passed
FadhlanR added a commit that referenced this pull request May 19, 2026
Only the stable promotion job writes `packages/boxel-cli/CHANGELOG.md`
now. The per-merge unstable job still produces a rich filtered GitHub
Release body but doesn't append to the on-disk changelog. Per-bump
unstable detail stays available on the Releases page and on npm.

Reset `CHANGELOG.md` to its seed state so the file starts fresh on the
next stable cut — the existing `.293` / `.294` / `.298` entries were
all generated with `PREV_TAG=boxel-cli-v0.1.4` (the lightweight-tag
bug fixed in #4879 left intermediate tags unpushed, so `git describe`
kept walking back to the last actually-pushed tag). Each entry was
the same noisy ~50-PR repo-wide list and not worth keeping around.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant