File tree Expand file tree Collapse file tree 5 files changed +2199
-8880
lines changed Expand file tree Collapse file tree 5 files changed +2199
-8880
lines changed Original file line number Diff line number Diff line change 26
26
node-version : ${{ matrix.node_version }}
27
27
- run : npm ci
28
28
- run : npm test
29
-
30
- publish-npm :
31
- if : ${{ github.event_name == 'push' }}
32
- needs : build
33
- runs-on : ubuntu-latest
34
- steps :
35
- - uses : actions/checkout@v4
36
- - uses : actions/setup-node@v4
37
- with :
38
- node-version : 22
39
- registry-url : https://registry.npmjs.org/
40
- - run : npm ci
41
- - run : npm whoami
42
- - run : npm run release
43
- env :
44
- NPM_TOKEN : ${{secrets.NPM_TOKEN}}
45
- GITHUB_TOKEN : ${{secrets.GH_RELEASE_TOKEN}}
Original file line number Diff line number Diff line change
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
+
4
+ name : Publish to npm
5
+
6
+ on :
7
+ release :
8
+ types : [published]
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - uses : actions/setup-node@v4
16
+ with :
17
+ node-version : 22
18
+ - run : npm ci
19
+ - run : npm test
20
+
21
+ publish-npm :
22
+ needs : build
23
+ runs-on : ubuntu-latest
24
+ permissions :
25
+ id-token : write
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ - uses : actions/setup-node@v4
29
+ with :
30
+ node-version : 22.x
31
+ registry-url : ' https://registry.npmjs.org'
32
+ cache : ' npm'
33
+ - run : npm ci
34
+ - run : npm version ${TAG_NAME} --git-tag-version=false
35
+ env :
36
+ TAG_NAME : ${{ github.ref_name }}
37
+ - run : npm publish --provenance --access public --tag next
38
+ if : " github.event.release.prerelease"
39
+ env :
40
+ NODE_AUTH_TOKEN : ${{ secrets.npm_secret }}
41
+ - run : npm publish --provenance --access public
42
+ if : " !github.event.release.prerelease"
43
+ env :
44
+ NODE_AUTH_TOKEN : ${{ secrets.npm_secret }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments