Skip to content

ci, docs: harden the publish workflow and document releasing - #298

Merged
gnidan merged 4 commits into
mainfrom
docs-release-hygiene
Sep 17, 2026
Merged

gnidan merged 4 commits into
mainfrom
docs-release-hygiene

Conversation

@gnidan

@gnidan gnidan commented Sep 16, 2026

Copy link
Copy Markdown
Member

Follow-ups from the first prerelease (0.1.0-1), one commit each, plus a review-fix commit.

publish.yml now grants id-token: write to the publish job only; the check job gets contents: read. The tag check captures git tag --points-at HEAD into a variable before grepping it: under shell: bash (which adds -o pipefail) grep -q can kill git with SIGPIPE and turn a match into tagged=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/bugc was the one package npm 11 warned about at publish time ("auto-corrected some errors in your package.json"). The cause is bin.bugc written as ./dist/bin/bugc.js: npm normalizes it to dist/bin/bugc.js and warns. The manifest now uses the normalized form, which is exactly what npm pkg fix produces, and npm publish --dry-run under 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.ts comments in pointers-react and programs-react told consumers to import @ethdebug/<pkg>/components/*.css. Neither package has an exports map and the stylesheets ship under dist/src/components/, so those paths never resolved. The comments now show the real path and list the available files; pointers-react's notes that variables.css must come first, since the component stylesheets use its custom properties without fallbacks.

RELEASING.md is the runbook: versioning model (including that Lerna bumps only packages changed since their last tag plus dependents, and --force-publish for lockstep), the explicit-version lerna version command and why each flag is there (lerna version prerelease yields 0.1.0-alpha.0 because Lerna's preid falls back to "alpha"; --no-commit-hooks keeps lint-staged off the Publish commit; --no-push avoids Lerna's silent non-atomic retry and --no-verify), the atomic push and its recovery, what the workflow and bin/publish-tagged.ts do, 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 under latest; a stage-only trusted publisher would force a rewrite, tracked in #296).

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-17 00:36 UTC

@gnidan
gnidan force-pushed the docs-release-hygiene branch from 6cac031 to c3172ff Compare September 16, 2026 23:22
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
gnidan force-pushed the docs-release-hygiene branch from f3e4647 to fc24efb Compare September 17, 2026 00:15
@gnidan
gnidan merged commit 443e5f8 into main Sep 17, 2026
5 checks passed
@gnidan
gnidan deleted the docs-release-hygiene branch September 17, 2026 00:32
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