File tree Expand file tree Collapse file tree 2 files changed +50
-3
lines changed Expand file tree Collapse file tree 2 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
13
- node-version : [19.x ]
13
+ node-version : [18, 20, 22 ]
14
14
fail-fast : false
15
15
steps :
16
16
- name : Checkout
17
- uses : actions/checkout@v2
17
+ uses : actions/checkout@v4
18
18
- name : Use Node v${{ matrix.node-version }}
19
- uses : actions/setup-node@v2
19
+ uses : actions/setup-node@v4
20
20
with :
21
21
node-version : ${{ matrix.node-version }}
22
22
- name : Install Dependencies
Original file line number Diff line number Diff line change
1
+ name : Publish Release (npm)
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v4
13
+ - name : Setup Node
14
+ uses : actions/setup-node@v4
15
+ with :
16
+ node-version : 20
17
+ - name : Install Dependencies
18
+ run : npm ci
19
+ - name : Lint
20
+ run : npm run lint
21
+ - name : Build
22
+ run : npm run build
23
+ - name : Test
24
+ run : npm test
25
+
26
+ publish-npm :
27
+ needs : build
28
+ runs-on : ubuntu-latest
29
+ permissions :
30
+ id-token : write
31
+ env :
32
+ NODE_AUTH_TOKEN : ${{ secrets.npm_token }}
33
+ steps :
34
+ - uses : actions/checkout@v4
35
+ - uses : actions/setup-node@v4
36
+ with :
37
+ node-version : 22.x
38
+ registry-url : ' https://registry.npmjs.org'
39
+ cache : ' npm'
40
+ - run : npm ci
41
+ - run : npm version ${TAG_NAME} --git-tag-version=false
42
+ env :
43
+ TAG_NAME : ${{ github.ref_name }}
44
+ - run : npm publish --provenance --access public --tag next
45
+ if : " github.event.release.prerelease"
46
+ - run : npm publish --provenance --access public
47
+ if : " !github.event.release.prerelease"
You can’t perform that action at this time.
0 commit comments