File tree Expand file tree Collapse file tree 2 files changed +25
-20
lines changed Expand file tree Collapse file tree 2 files changed +25
-20
lines changed Original file line number Diff line number Diff line change 33 branches :
44 - main
55 pull_request :
6- pull_request_target :
76name : ci
8- permissions :
9- contents : read
10- actions : read
7+ env :
8+ NODE : 22
119jobs :
1210 test :
1311 runs-on : ubuntu-latest
1412 strategy :
13+ fail-fast : false
1514 matrix :
1615 node : [18, 20, 22]
1716 steps :
1817 - uses : actions/checkout@v5
1918 - uses : actions/setup-node@v5
2019 with :
2120 node-version : ${{ matrix.node }}
22- - run : npm install
21+ cache : npm
22+ - run : npm ci
2323 - run : npm test
2424 lint :
2525 runs-on : ubuntu-latest
2626 steps :
2727 - uses : actions/checkout@v5
2828 - uses : actions/setup-node@v5
2929 with :
30- node-version : 22
31- - run : npm install
30+ node-version : ${{ env.NODE }}
31+ cache : npm
32+ - run : npm ci
3233 - run : npm run lint
3334 conventional-commits :
3435 runs-on : ubuntu-latest
3940 fetch-depth : 0
4041 - uses : actions/setup-node@v5
4142 with :
42- node-version : 22
43- - run : npm install
43+ node-version : ${{ env.NODE }}
44+ cache : npm
45+ - run : npm ci
4446 - name : Validate PR commits with commitlint
4547 run : npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
Original file line number Diff line number Diff line change 1- name : Release Please
2-
31on :
42 push :
53 branches :
64 - main
7-
5+ name : release
6+ env :
7+ NODE : 22
88jobs :
99 release-please :
10+ if : github.repository == 'discord/discord-interactions-js'
1011 runs-on : ubuntu-latest
1112 permissions :
1213 contents : write
@@ -18,21 +19,23 @@ jobs:
1819 - uses : googleapis/release-please-action@v4
1920 id : release
2021 with :
21- release-type : node
22-
22+ token : ${{ secrets.GITHUB_TOKEN }}
2323 publish :
24- needs : release-please
25- if : ${{ needs.release-please.outputs.release_created }}
24+ if : needs.release-please.outputs.release_created
2625 runs-on : ubuntu-latest
26+ needs : release-please
2727 permissions :
28- contents : read
28+ contents : write
2929 id-token : write
3030 steps :
3131 - uses : actions/checkout@v5
3232 - uses : actions/setup-node@v5
3333 with :
34- node-version : 22
34+ node-version : ${{ env.NODE }}
35+ cache : npm
3536 registry-url : ' https://registry.npmjs.org'
3637 - run : npm ci
37- - name : Publish to npm 🚀
38- run : npm publish --provenance --access public
38+ - run : npm run build
39+ - run : npm publish --provenance --access public
40+ env :
41+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments