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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+ name : Node.js Package
5+
6+ on :
7+ push :
8+ branches :
9+ - alpha
10+
11+ jobs :
12+ build :
13+
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : 20
20+ - run : npm ci
21+ - run : npm run build
22+ - run : npm test
23+
24+ publish-npm :
25+ needs : build
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : actions/checkout@v4
29+ - uses : actions/setup-node@v4
30+ with :
31+ node-version : 20
32+ registry-url : https://registry.npmjs.org/
33+ - run : npm ci
34+ - run : npm run build
35+ - run : npm publish --tag alpha
36+ env :
37+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments