-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Continuous release with pkg.pr.new and esm.sh #8603
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
Open
limzykenneth
wants to merge
13
commits into
processing:dev-2.0
Choose a base branch
from
limzykenneth:dev-2.0
base: dev-2.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+645
−3
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4837e8f
Try to set up pkg.pr.new
limzykenneth b5a2fcd
Only run CR in processing repo
limzykenneth d4a966b
Provide PR write permission and set URL
limzykenneth 0b893fe
Tying to get CI to run on PR push
limzykenneth 8fdac71
Another fix on CR running and commenting
limzykenneth da46ad6
We will squash merge this
limzykenneth 8a72ea4
This may be the correct key
limzykenneth 28394b6
Possibly this
limzykenneth 779fe76
Another attempt
limzykenneth 9ba1e9f
Use account based access token
limzykenneth be704cc
Switch to uploading artifact and Github App
limzykenneth 28ae294
Include PR number in output.json
limzykenneth da8a336
Rename output artifact file
limzykenneth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Publish approved pull requests and latest commit to pkg.pr.new | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - 'dev-2.0' | ||
| push: | ||
| branches: | ||
| - 'dev-2.0' | ||
| tags: | ||
| - '!**' | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| publish: | ||
| if: github.repository == 'processing/p5.js' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build library | ||
| run: npm run build | ||
|
|
||
| - name: Publish library | ||
| run: npx pkg-pr-new publish --no-template --json output.json --comment=off | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also minor: pin pkg-pr-new version?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| - name: Include PR info in output file | ||
| uses: actions/github-script@v8 | ||
| env: | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const output = JSON.parse(fs.readFileSync('output.json', 'utf8')); | ||
| output.workflow = { | ||
| pull_request: process.env.PR_NUMBER ? { | ||
| number: process.env.PR_NUMBER | ||
| } : null | ||
| }; | ||
| fs.writeFileSync('output.json', JSON.stringify(output)); | ||
|
|
||
| - name: Upload output data | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: output.zip | ||
| path: output.json | ||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Extremely minor: or keep RCs?
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.
RC will get published on NPM so it is available through jsdelivr already