File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1
- on : push
1
+ name : Publish to npm
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main # adjust to your main branch name
2
7
3
8
jobs :
4
9
publish :
5
10
runs-on : ubuntu-latest
6
11
steps :
7
- - uses : actions/checkout@v3
8
- - uses : actions/setup-node@v3
12
+ - uses : actions/checkout@v2
13
+ - name : Set up Node.js
14
+ uses : actions/setup-node@v2
9
15
with :
10
- node-version : ' 20'
11
- - run : npm install
12
- - run : npm test
13
- - run : npm publish --access public
16
+ node-version : ' 20' # adjust to your Node.js version
17
+ - name : Install dependencies
18
+ run : npm install
19
+ - name : Run tests # optional, add if you have tests to run
20
+ run : npm test
21
+ - name : Publish to npm
22
+ run : npm publish --access public # adjust --access as needed for public/private packages
14
23
env :
15
24
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments