Skip to content

Continuous release with pkg.pr.new and esm.sh#8603

Open
limzykenneth wants to merge 13 commits intoprocessing:dev-2.0from
limzykenneth:dev-2.0
Open

Continuous release with pkg.pr.new and esm.sh#8603
limzykenneth wants to merge 13 commits intoprocessing:dev-2.0from
limzykenneth:dev-2.0

Conversation

@limzykenneth
Copy link
Member

Resolves #8570

Changes:

Add dev dependency and workflow required to enable continuous release. Still need to verify that the deployment and custom message is working as intended.

@p5-bot
Copy link

p5-bot bot commented Mar 5, 2026

@limzykenneth
Copy link
Member Author

@ksen0 @davepagurek This is done now and ready for review. The build and release are triggered on pull request event so each push update will run it, similar to the regular test CI; it will also run on push to dev-2.0 branch which should mean that there will always be a head commit build.

Once built, the package will be published to pkg.pr.new in the same manner as publishing on NPM except it will be tagged with the specific commit rather than version number. Once publish, esm.sh will automatically pick it up and the relevant CDN link will be available. We should change the CI build run to require approval for all external contributors before merging this.

Also involved is the comment bot @p5-bot, which will comment on PR like the above with relevant links ready to be used. "CDN link" is the link ready to be used in a script tag; "Published Packages" is the link that can be npm installed. As additional push are made to the PR and new version is built and published, the previous link will be recorded in the collapsible section under the relevant commit hash that the build is generated from.

Please review the implementation to check I didn't miss any specific edge cases especially in terms of any unintended publishing. Once it all looks good we can squash and merge since the history here is mostly trial and error stuff from me.

branches:
- 'dev-2.0'
tags:
- '!**'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extremely minor: or keep RCs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC will get published on NPM so it is available through jsdelivr already

run: npm run build

- name: Publish library
run: npx pkg-pr-new publish --no-template --json output.json --comment=off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also minor: pin pkg-pr-new version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg-pr-new is pin as a dev dependency in the repo and not through an action so should be fixed by package-lock.json

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.

2 participants