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 : Publish GitHub package
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ release :
6
+ types : [created]
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Use Node.js
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version : 20
21
+ registry-url : ' https://registry.npmjs.org'
22
+ cache : ' npm'
23
+
24
+ - name : Install dependencies
25
+ run : npm ci
26
+
27
+ - name : Set version to release tag
28
+ shell : bash
29
+ id : define_tag
30
+ run : |
31
+ PACKAGE_VERSION=$(git describe --abbrev=0 --tags | sed 's/^v//')
32
+ echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
33
+
34
+ - name : Build
35
+ run : npm run build
36
+
37
+ - name : Publish
38
+ run : npm publish
39
+ env :
40
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments