File tree 3 files changed +72
-0
lines changed
3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ check :
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Set up Node.js
15
+ uses : actions/setup-node@v4
16
+ with :
17
+ node-version : 22.x
18
+
19
+ - name : Install dependencies
20
+ run : npm install
21
+
22
+ - name : Check build
23
+ run : npm run build
24
+
Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*.*.*'
7
+
8
+ jobs :
9
+ check :
10
+ uses : ./.github/workflows/check.yml
11
+
12
+ publish :
13
+ runs-on : ubuntu-latest
14
+ needs : check
15
+ permissions :
16
+ contents : read
17
+ id-token : write
18
+
19
+ steps :
20
+ - name : Checkout code
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Setup Node.js
24
+ uses : actions/setup-node@v4
25
+ with :
26
+ node-version : 22.x
27
+ registry-url : ' https://registry.npmjs.org'
28
+
29
+ - name : Install dependencies
30
+ run : npm install
31
+
32
+ - name : Build the project
33
+ run : npm run build
34
+
35
+ - name : Publish to NPM
36
+ run : npm publish --provenance --access public
37
+ env :
38
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Pull request workflow
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ check :
10
+ uses : ./.github/workflows/check.yml
You can’t perform that action at this time.
0 commit comments