We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0ac5af commit c241f5fCopy full SHA for c241f5f
.github/workflows/main.yml
@@ -2,8 +2,9 @@ on:
2
push:
3
branches:
4
- main
5
-
6
pull_request:
+ release:
7
+ types: [created]
8
9
jobs:
10
build:
@@ -18,9 +19,25 @@ jobs:
18
19
20
- run: npm ci
21
- run: npm run build
22
- - name: Verify that `npm run build` did not change outputs
23
- run: git diff --exit-code
24
25
- run: npm test
26
- run: npm run lint
+
+ package:
+ runs-on: ubuntu-latest
27
+ if: github.event_name == 'release'
28
+ needs: build
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-node@v4
32
+ with:
33
+ node-version: 18
34
+ cache: npm
35
36
+ - run: npm ci
37
+ - run: npm pack
38
39
+ - name: Upload package to release
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42
+ run: |
43
+ gh release upload ${{ github.event.release.tag_name }} ./*.tgz
0 commit comments