@@ -18,13 +18,15 @@ jobs:
1818 INPUT_TOKEN : ${{ secrets.NPM_TOKEN }}
1919 steps :
2020 # 1. Setup
21- - uses : actions/checkout@v3
22- - uses : actions/setup-node@v3
21+ - uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2322 with :
24- node-version : 22
23+ persist-credentials : false
24+ - uses : actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
25+ with :
26+ node-version : 20
2527 - name : Get semver info
2628 id : semver
27- uses : akshens/semver-tag@v4
29+ uses : akshens/semver-tag@8e427cd48c699c97d021df4946f3a0e65af5047e # v4
2830 with :
2931 version : ${{ github.ref_name }}
3032
@@ -41,17 +43,16 @@ jobs:
4143 run : npm ci
4244 env :
4345 CI : true
44- - name : Run test
46+ - name : Run build
4547 run : npm test
4648 env :
4749 CI : true
48- - name : Run build
49- run : npm run build
50+ - run : rm ./lib/p5-test.js ./lib/p5.pre-min.js
5051
5152 # 2. Prepare release files
5253 - run : mkdir release && mkdir p5 && cp -r ./lib/* p5/
5354 - name : Create release zip file
54- uses : TheDoctor0/zip-release@0.6.2
55+ uses : TheDoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657 # 0.6.2
5556 with :
5657 type : zip
5758 filename : release/p5.zip
6263
6364 # 3. Release p5.js
6465 - name : Create GitHub release
65- uses : softprops/action-gh-release@v0.1.15
66+ uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
6667 with :
6768 draft : true
6869 prerelease : ${{ steps.semver.outputs.is-prerelease == 'true' }}
@@ -71,19 +72,21 @@ jobs:
7172 token : ${{ secrets.ACCESS_TOKEN }}
7273 - name : Publish to NPM
7374 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
74- uses : JS-DevTools/npm-publish@v1
75+ uses : JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
7576 with :
7677 token : ${{ secrets.NPM_TOKEN }}
78+ tag : r1
7779
7880 # 4. Update p5.js website
7981 - name : Clone p5.js website
8082 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
81- uses : actions/checkout@v3
83+ uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
8284 with :
8385 repository : processing/p5.js-website
8486 path : website
8587 fetch-depth : 0
8688 token : ${{ secrets.ACCESS_TOKEN }}
89+ persist-credentials : false
8790 - name : Updated website files
8891 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
8992 run : |
@@ -104,7 +107,7 @@ jobs:
104107 git commit -m "Update p5.js to ${{ github.ref_name }}"
105108 - name : Push updated website repo
106109 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
107- uses : ad-m/github-push-action@v0.6.0
110+ uses : ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
108111 with :
109112 github_token : ${{ secrets.ACCESS_TOKEN }}
110113 branch : main
@@ -114,12 +117,13 @@ jobs:
114117 # 5. Update Bower files
115118 - name : Checkout Bower repo
116119 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
117- uses : actions/checkout@v3
120+ uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
118121 with :
119122 repository : processing/p5.js-release
120123 path : bower
121124 fetch-depth : 0
122125 token : ${{ secrets.ACCESS_TOKEN }}
126+ persist-credentials : false
123127 - name : Copy new version files to Bower repo
124128 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
125129 run : |
@@ -135,7 +139,7 @@ jobs:
135139 git commit -m "Update p5.js to ${{ github.ref_name }}"
136140 - name : Push updated Bower repo
137141 if : ${{ steps.semver.outputs.is-prerelease != 'true' }}
138- uses : ad-m/github-push-action@v0.6.0
142+ uses : ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
139143 with :
140144 github_token : ${{ secrets.ACCESS_TOKEN }}
141145 branch : master
0 commit comments