File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 30
30
31
31
- name : Build
32
32
run : yarn build
33
+
34
+ publish :
35
+ name : Publish to npm registry with semantic release
36
+
37
+ if : ${{ github.ref == 'refs/heads/main' }}
38
+ needs : [build]
39
+
40
+ runs-on : ${{ matrix.os }}
41
+ strategy :
42
+ matrix :
43
+ node : ['10.x', '12.x', '14.x']
44
+ os : [ubuntu-latest, windows-latest, macOS-latest]
45
+
46
+ steps :
47
+ - name : Checkout repo
48
+ uses : actions/checkout@v2
49
+
50
+ - name : Use Node ${{ matrix.node }}
51
+ uses : actions/setup-node@v1
52
+ with :
53
+ node-version : ${{ matrix.node }}
54
+
55
+ - name : Install deps and build (with cache)
56
+ uses : bahmutov/npm-install@v1
57
+
58
+ - name : Publish with Semantic Versioning
59
+ run : npm run semantic-release
60
+ env :
61
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
62
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments