Repository navigation
Typecheck and rehearse the release scripts - #10
Merged
Merged
Conversation
donnes
force-pushed
the
release-scripts
branch
from
October 21, 2026 16:20
98dbb89 to
c8af445
Compare
donnes
force-pushed
the
release-scripts
branch
2 times, most recently
from
October 21, 2026 16:27
2c81214 to
53b38cb
Compare
donnes
force-pushed
the
verify-bundle
branch
2 times, most recently
from
October 22, 2026 07:37
0d2978b to
dd347e3
Compare
release.ts and publish.ts used Bun-only APIs, so they were excluded from typecheck and had never run since being rewritten. They are now plain Node TypeScript, run with node, and included in tsconfig, oxlint and knip. A preview run of the workflow found releases broken regardless: the script pushed the version bump to main using GH_PAT, which has expired, and main's ruleset only lets admins bypass its PR requirement. Releases now come from tags instead: the release job computes the next version from the latest v* tag and creates the tag and GitHub release through the API, and the publish job stamps that version into package.json before building. Nothing is pushed to main, so the workflow's GITHUB_TOKEN is enough and GH_PAT is no longer used. package.json keeps a 0.0.0-development placeholder, which also skips the update notice. Preview mode runs every check plus an npm publish dry run of the next version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
donnes
force-pushed
the
release-scripts
branch
from
October 22, 2026 07:38
53b38cb to
71f1469
Compare
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.
Problem
release.tsandpublish.tswere rewritten in #7 but had never run. They used Bun-only APIs, so they weren't typechecked. Running the "Release & Publish" workflow in preview mode on this branch showed that releases were broken already, independent of this stack:GH_PATsecret, which is now rejected (last successful release: 2026-02-19), presumably because it expired.main.main's ruleset requires reviewed, squash-merged PRs and only lets admin/maintain roles bypass that, so the workflow's ownGITHUB_TOKENcan't replace the PAT.Solution
node, and included in tsconfig, oxlint and knip.v*tag and creates the tag and GitHub release through the API, with generated notes.package.jsonbefore building and publishing with provenance.main, soGITHUB_TOKENis enough andGH_PATis no longer used. With trusted publishing, the repo needs no long-lived secrets.package.jsonkeeps0.0.0-development, and the update notice skips that version.Stacked on #9.
Verification
npm publish --dry-runat 2.0.0.gh: it calledgh release create v2.0.0 --target <sha> --generate-notesand pushed nothing. The publish script stamped 2.0.0, and the built CLI reports2.0.0.npm publish. It failed: there was no npm login, and provenance needs GitHub's OIDC. The registry still shows 1.1.9 as latest. Publishing itself can only be verified with trusted publishing set up.Before the first release
@donnes/syncode→donnes/syncode, workflowpublish.yml.GH_PATandNPM_TOKENsecrets afterwards.🤖 Generated with Claude Code