Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ jobs:
*) tag=latest ;;
esac
fi
npm stage publish "$tarball" --provenance --ignore-scripts --access public --tag "$tag"
# 0.4.1 to 0.12.2 published directly, so a trusted publisher set up in that time may not allow staging.
if ! npm stage publish "$tarball" --provenance --ignore-scripts --access public --tag "$tag"; then
echo "::error::npm refused to stage $name@$version. If it answered E403 or E404, allow npm stage publish in the package's trusted publisher on npmjs.com, then rerun this workflow on the tag."
return 1
fi
}
export -f publish_package
package_manifests=()
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ How most packages work, so the bullets below don't repeat it:
uppt opens a draft `release/vX.Y.Z` PR from conventional commits on `main`, in lockstep for every package matched by `packages/*`. Merging it tags the version and stages each package on npm through OIDC trusted publishing. Each goes live when the maintainer approves it with 2FA on npmjs.com.

- Every package is staged, never published directly. pnpm ranks a staged publish above a direct one, and its `trustPolicy: no-downgrade` refuses any version with weaker evidence than an earlier one. comark-annotate, comark-carousel, and comark-zoom began staged, so their direct releases from 0.4.1 to 0.12.2 can't be installed under that policy. `test/npm-trust.test.ts` fails if the workflow publishes directly again.
- A new package needs a trusted publisher on npmjs.com before its first release, with workflow `release.yaml`, environment `npm`, and `npm stage publish` allowed. Leave `npm publish` off.
- A new package needs a trusted publisher on npmjs.com before its first release, with workflow `release.yaml`, environment `npm`, and `npm stage publish` allowed. Leave `npm publish` off. Publishers set up while releases went out directly (0.4.1 to 0.12.2) may not allow staging, so check them with `npm trust list <pkg>` before the first staged release; the publish job names the package npm refuses.
- The publish job stages in waves of dependency order and lists them in its summary. Approve in that order, so `latest` never names a sibling version npm lacks: comark-ui after its plugins, comark-linter after comark-ui.
- The verify job waits up to six hours for the approvals, then fails for any version that is missing or went out without a staged publish. Approve the rest and rerun it.
- If staging fails after the tag exists, approve or reject what it staged, then run `gh workflow run release.yaml --repo onmax/comark-ui --ref vX.Y.Z`. It skips versions already on npm.
Expand Down
Loading