Repository navigation
ci(release): publish directly after an approval in GitHub Actions instead of staging on npm - #484
Conversation
…tead of staging on npm Staging made every package wait for its own security-key approval on npmjs.com. The npm environment now requires a reviewer, so a release takes one approval in GitHub and then publishes with npm publish through OIDC trusted publishing, as before #435.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-motion
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
The next direct release will fail clean installs of comark-ui under pnpm’s trustPolicy: no-downgrade. The cutover also needs an explicit plan for the partially published v0.14.2 tag.
Approach: Moving approval to GitHub simplifies releases, but it gives up the npm evidence that users with trustPolicy: no-downgrade need.
Reviewed changes in the release workflow and its maintainer and consumer docs:
- Publish: Switches the dependency waves from
npm stage publishtonpm publishbehind thenpmenvironment. I confirmed that the environment has a required reviewer and allowsv*tags. - Verification: Keeps the tagged build and test gate and removes the post-publish staged-evidence check, helper, and test.
- Recovery and installs: Updates trusted-publisher setup, tag reruns, and the pnpm exact-version exception guidance.
⚠️ P1 — Class: release approval drops pnpm trust evidence
A clean install of the next stable comark-ui release under trustPolicy: no-downgrade will fail: the new preset requires sibling versions at or above its own version, but pnpm rejects direct OIDC publishes of comark-zoom, comark-carousel, comark-annotate, and other packages with a prior staged release. GitHub’s approval does not produce npm’s _npmUser.approver metadata, so the documented exceptions shift the cost to consumers on every upgrade rather than preserving the install path fixed by #435. npm now supports batch approval with one 2FA challenge for up to 100 versions, though availability is still rolling out by account.
Technical details
# Preserve installs under pnpm's trust policy
## Affected sites
- [.github/workflows/release.yaml:193](https://github.com/onmax/comark-ui/blob/d486410db151100dc72c0ee5b17798364f30bb37/.github/workflows/release.yaml#L193) — direct OIDC publish does not carry npm's staged approval evidence.
- [packages/ui/package.json:64](https://github.com/onmax/comark-ui/blob/d486410db151100dc72c0ee5b17798364f30bb37/packages/ui/package.json#L64-L114) — the packed `workspace:^` dependencies rule out falling back to versions older than the new lockstep release.
- [docs/pages/getting-started.md:254](https://github.com/onmax/comark-ui/blob/d486410db151100dc72c0ee5b17798364f30bb37/docs/pages/getting-started.md#L254-L281) — the workaround requires consumers to waive the check for specific versions.
## Required outcome
- Preserve a fresh `pnpm add comark-ui` under `trustPolicy: no-downgrade` without an exception for each new sibling release, or explicitly decide that this install path will no longer be supported.
## Suggested approach
- Check whether npm batch approval is available for the maintainer account before dropping staging. The largest current dependency wave has 43 packages, below the 100-version limit. Approve one wave at a time because npm batch actions can succeed partially.
- Verified the ranking with public registry metadata and clean pnpm resolutions: `[email protected]` returned `ERR_PNPM_TRUST_DOWNGRADE`; staged `[email protected]` resolved successfully.⚠️ P1 — Class: recovery dispatch uses the old release workflow
The documented --ref vX.Y.Z retry runs the workflow stored at that tag, not the workflow on main. For the already partial v0.14.2, that workflow still stages packages, so rejecting the pending stages and rerunning the tag after merge will not complete the release via direct publish.
Technical details
# Define the transition for the existing release
## Affected sites
- [AGENTS.md:325](https://github.com/onmax/comark-ui/blob/d486410db151100dc72c0ee5b17798364f30bb37/AGENTS.md#L325) — the new retry instructions only run direct publish for tags that already contain the new workflow.
- [Failed v0.14.2 publish job](https://github.com/onmax/comark-ui/actions/runs/45209157933/job/137822409316) — staging failed on `[email protected]` with `E401` before later waves ran.
## Required outcome
- State which release first uses the new flow and how to handle the partial `v0.14.2` release before disposing of its pending stages. Finish it with the tagged staging workflow after fixing `comark-motion`'s publisher, or explicitly supersede it with a fresh release tag rather than relying on a redispatch to switch publishing modes.gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Ready to merge; no repair push needed. The PR explicitly drops exception-free installs under pnpm’s no-downgrade policy for affected packages and directs maintainers to supersede v0.14.2 with a fresh stable tag, not redispatch it. I verified that v0.14.2 still stages packages. Hosted checks are green, shell syntax passed, and local lint passed with warnings. npm publisher setup remains a prerequisite for the next release, not for merge. Session Waiting for running checks before the next pass. |

Staged releases (#435) made every package wait for its own security-key approval on npmjs.com, about 54 per release. v0.14.2 got stuck partway: 9 packages are live, about 33 are staged and waiting, and the rest never staged because
comark-motionfailed with E401.This goes back to
npm publishthrough OIDC trusted publishing, as it worked before #435. The approval moves to GitHub. Thenpmenvironment now requiresonmaxas a reviewer (already set in the repository settings), so the publish job waits for one approval in Actions and then publishes every wave..github/npm-trust.ts, and its test, which existed to enforce staging.npm publishallowed.trustPolicy: no-downgradefor affected packages or presets that depend on them. Users who accept the change can verify provenance and add exceptions for the exact versions they install.Before the next release:
npm publish. fix(release): stage every package so pnpm's trust policy accepts new releases #435 suggested turning it off, and I couldn't check without a security key.comark-motionneeds a trusted publisher. Its 0.14.2 stage failed with E401.mainafter this workflow lands. Leave live versions in place and reject the pending 0.14.2 stages on npm. Do not move or redispatchv0.14.2: that tag still contains the staging workflow.🤖 Generated with Claude Code