-
Notifications
You must be signed in to change notification settings - Fork 991
Setting up pkg.pr.new #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this! Just wanted to clarify why we need this change to the release process:
- we have a release process with versioning now, and scheduled releases every week on Thursday
- running builds on every commit to every branch is wasteful - unless I misunderstand the config, sorry
The point is, for PRs like #717 (and #687 which introduced the bug), you can properly test that PR in projects that depend on the SDK. For example, for https://github.com/modelcontextprotocol/use-mcp, the first I saw of the regression was when As for wastefulness, we already run builds on every commit/branch. This just saves the resulting package somewhere useful. |
I think more importantly, we do not auto-publish this SDK, we need an approval for publish. |
This puts in line with the existing `main` workflow.
I've changed the config to run for the same commits as the
This isn't really a "publish" step the way pushing to NPM is. It doesn't update a tag, nobody will accidentally get this version when they thought they were getting a tagged release. It's basically the same as "publishing" a git commit by pushing it to github—it makes that code permanently accessible via the commit SHA. The only step that requires "approval" is merging to It used to take a bunch of work to set this up (see cloudflare/workers-sdk#9492 😅), and it was still worth it then! But now it requires basically no work to set up and maintain. |
This publishes NPM-compatible URLs for each commit on the repo:
This makes it possible for people (like myself!) to build against the SDK before it goes through a release, to validate that everything's working with the downstream packages.
It requires installing this GH app on the main repo: https://github.com/apps/pkg-pr-new
Tested this on the
geelen
fork (see screenshots) but this code really needs to be added as a branch to the main repo, then someone can iterate until they're happy with the output. Instructions for customisation are here, but I find the default look pretty much fine.