File tree 1 file changed +30
-5
lines changed
1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change 2
2
push :
3
3
branches :
4
4
- main
5
-
6
5
pull_request :
6
+ release :
7
+ types : [created]
8
+
9
+ concurrency :
10
+ group : ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress : true
7
12
8
13
jobs :
9
14
build :
18
23
19
24
- run : npm ci
20
25
- run : npm run build
21
-
22
- - name : Verify that `npm run build` did not change outputs
23
- run : git diff --exit-code
24
-
25
26
- run : npm test
26
27
- run : npm run lint
28
+
29
+ package :
30
+ runs-on : ubuntu-latest
31
+ if : github.event_name == 'release'
32
+ needs : build
33
+
34
+ permissions :
35
+ contents : write
36
+
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+ - uses : actions/setup-node@v4
40
+ with :
41
+ node-version : 18
42
+ cache : npm
43
+
44
+ - run : npm ci
45
+ - run : npm pack
46
+
47
+ - name : Upload package to release
48
+ env :
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
+ run : |
51
+ gh release upload ${{ github.event.release.tag_name }} ./*.tgz
You can’t perform that action at this time.
0 commit comments