File tree Expand file tree Collapse file tree 3 files changed +645
-3
lines changed
Expand file tree Collapse file tree 3 files changed +645
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Publish approved pull requests and latest commit to pkg.pr.new
2+ on :
3+ pull_request :
4+ branches :
5+ - ' dev-2.0'
6+ push :
7+ branches :
8+ - ' dev-2.0'
9+ tags :
10+ - ' !**'
11+
12+ permissions :
13+ pull-requests : write
14+ issues : write
15+
16+ jobs :
17+ publish :
18+ if : github.repository == 'processing/p5.js'
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : 22
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Build library
31+ run : npm run build
32+
33+ - name : Publish library
34+ run : npx pkg-pr-new publish --no-template --json output.json --comment=off
35+
36+ - name : Include PR info in output file
37+ uses : actions/github-script@v8
38+ env :
39+ PR_NUMBER : ${{ github.event.pull_request.number }}
40+ with :
41+ script : |
42+ const fs = require('fs');
43+ const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
44+ output.workflow = {
45+ pull_request: process.env.PR_NUMBER ? {
46+ number: process.env.PR_NUMBER
47+ } : null
48+ };
49+ fs.writeFileSync('output.json', JSON.stringify(output));
50+
51+ - name : Upload output data
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : output.zip
55+ path : output.json
You can’t perform that action at this time.
0 commit comments