File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+ name : Node.js Package
5+
6+ on : push
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v5
13+ - uses : actions/setup-node@v5
14+ with :
15+ node-version : lts/*
16+ - run : npm ci
17+ - run : npm test
18+
19+ publish-npm :
20+ needs : build
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@v5
24+ - uses : actions/setup-node@v5
25+ with :
26+ node-version : lts/*
27+ registry-url : https://registry.npmjs.org/
28+
29+ - run : npm ci
30+ - run : npm publish
31+ env :
32+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
33+
34+ publish-gpr :
35+ needs : build
36+ runs-on : ubuntu-latest
37+ steps :
38+ - uses : actions/checkout@v5
39+ - uses : actions/setup-node@v5
40+ with :
41+ node-version : lts/*
42+ registry-url : https://npm.pkg.github.com/
43+ - run : npm ci
44+ - run : npm publish
45+ env :
46+ NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
47+
You can’t perform that action at this time.
0 commit comments