File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy release to NPM
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ publish-to-npm :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+
13
+ - name : Set up node
14
+ uses : actions/setup-node@v1
15
+ with :
16
+ node-version : ' 18'
17
+ # Enables caching Yarn dependencies (uses https://github.com/actions/cache under the hood)
18
+ cache : ' yarn'
19
+
20
+ - name : Install dependencies
21
+ run : yarn install --frozen-lockfile
22
+
23
+ - name : Build the library
24
+ run : yarn prepublishOnly
25
+
26
+ - name : Publish the library
27
+ run : yarn publish --new-version ${{ github.event.release.tag_name }}
28
+ env :
29
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
30
+
31
+ - name : setup git config
32
+ run : |
33
+ git config user.name "GitHub Actions Bot"
34
+ git config user.email "<>"
35
+
36
+ - name : Commit files
37
+ run : |
38
+ git add package.json
39
+ git commit -m "chore: Release ${{ github.event.release.tag_name }}"
40
+ git push origin master
You can’t perform that action at this time.
0 commit comments