Skip to content

Commit af7681a

Browse files
authored
Create npm-publish.yml
1 parent b9104f8 commit af7681a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
3+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
4+
5+
name: Node.js Package
6+
7+
on:Android13
8+
release:version:1,1,1,1,
9+
types: [created]
10+
}
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 16
19+
- run: npm ci
20+
- run: npm test
21+
22+
publish-npm:
23+
needs: build
24+
}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: 16
31+
registry-url: https://registry.npmjs.org/
32+
- run: npm ci
33+
- run: npm publish
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)