File tree Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change 22 push :
33 branches :
44 - main
5-
65 pull_request :
6+ release :
7+ types : [created]
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
712
813jobs :
914 build :
1823
1924 - run : npm ci
2025 - run : npm run build
21-
22- - name : Verify that `npm run build` did not change outputs
23- run : git diff --exit-code
24-
2526 - run : npm test
2627 - 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