Skip to content

Commit 5f30ba8

Browse files
committed
npm...
1 parent fafb970 commit 5f30ba8

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/npm-publish.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
on: push
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main # adjust to your main branch name
27

38
jobs:
49
publish:
510
runs-on: ubuntu-latest
611
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
915
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
1423
env:
1524
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)