ci, docs: harden the publish workflow and document releasing - #298
Merged
Merged
Conversation
Contributor
|
gnidan
force-pushed
the
docs-release-hygiene
branch
from
September 16, 2026 23:22
6cac031 to
c3172ff
Compare
Grant id-token: write only to the publish job; the check job needs contents: read alone. Capture the tag list into a variable before piping it into grep: under a shell with pipefail, grep -q can kill the producer with SIGPIPE and turn a match into tagged=false, so the producer is now a builtin printf over an already-captured string. Note above the concurrency group that GitHub cancels a pending run when a newer one queues, so a cancelled Publish run must be re-run by hand.
npm warned at publish time that it auto-corrected the manifest: it normalizes a "./"-prefixed bin path to dist/bin/bugc.js and asks for npm pkg fix. Write the normalized form so the published manifest and the source agree and the warning goes away.
The stylesheets ship under dist/src/components/, and neither package declares an exports map, so the documented @ethdebug/<pkg>/components/*.css paths never resolved. For pointers-react, variables.css must be imported first: the component stylesheets use its --pointers-* custom properties without fallbacks.
Document how the @ethdebug/* packages are versioned and published: the independent versioning model, the explicit-version bump command and why `lerna version prerelease` cannot be used, the atomic push and its recovery, what publish.yml and bin/publish-tagged.ts do, the trusted-publisher setup on npmjs.com, the local fallback, the CI guards, and the known limits.
gnidan
force-pushed
the
docs-release-hygiene
branch
from
September 17, 2026 00:15
f3e4647 to
fc24efb
Compare
This was referenced Sep 17, 2026
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.
Follow-ups from the first prerelease (0.1.0-1), one commit each, plus a review-fix commit.
publish.ymlnow grantsid-token: writeto thepublishjob only; thecheckjob getscontents: read. The tag check capturesgit tag --points-at HEADinto a variable before grepping it: undershell: bash(which adds-o pipefail)grep -qcan killgitwith SIGPIPE and turn a match intotagged=false. A comment above the concurrency group records that GitHub still cancels a pending run in the group when a newer one queues, so a Publish commit whose run shows "cancelled" has to be re-run from the Actions UI.@ethdebug/bugcwas the one package npm 11 warned about at publish time ("auto-corrected some errors in your package.json"). The cause isbin.bugcwritten as./dist/bin/bugc.js: npm normalizes it todist/bin/bugc.jsand warns. The manifest now uses the normalized form, which is exactly whatnpm pkg fixproduces, andnpm publish --dry-rununder npm 11 no longer warns. The manifest on the registry for 0.1.0-1 already has the normalized form, so nothing changes for consumers.The
index.tscomments inpointers-reactandprograms-reacttold consumers to import@ethdebug/<pkg>/components/*.css. Neither package has an exports map and the stylesheets ship underdist/src/components/, so those paths never resolved. The comments now show the real path and list the available files; pointers-react's notes thatvariables.cssmust come first, since the component stylesheets use its custom properties without fallbacks.RELEASING.mdis the runbook: versioning model (including that Lerna bumps only packages changed since their last tag plus dependents, and--force-publishfor lockstep), the explicit-versionlerna versioncommand and why each flag is there (lerna version prereleaseyields0.1.0-alpha.0because Lerna's preid falls back to "alpha";--no-commit-hookskeeps lint-staged off the Publish commit;--no-pushavoids Lerna's silent non-atomic retry and--no-verify), the atomic push and its recovery, what the workflow andbin/publish-tagged.tsdo, the trusted-publisher setup on npmjs.com and the order of operations for a brand-new package, re-running and dispatching, the local fallback, the tarball guards, and the known limits (prereleases underlatest; a stage-only trusted publisher would force a rewrite, tracked in #296).