File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed
Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release prod
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ coding-style :
10+ name : Probe NodeJs - Code Style
11+ runs-on : ubuntu-latest
12+ timeout-minutes : 3
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : latest
19+
20+ - run : |
21+ make eslint
22+
23+ unit-tests :
24+ name : Probe Node.js ${{ matrix.version }} - Unit tests
25+ runs-on : ubuntu-latest
26+ needs : coding-style
27+ timeout-minutes : 3
28+ strategy :
29+ fail-fast : false
30+ matrix :
31+ version :
32+ - 18
33+ - 20
34+ - 21
35+ - 22
36+ steps :
37+ - uses : actions/checkout@v4
38+
39+ - uses : actions/setup-node@v4
40+ with :
41+ node-version : ${{ matrix.version }}
42+
43+ - run : |
44+ make test
45+
46+ release :
47+ name : Probe NodeJs - Release
48+ runs-on : ubuntu-latest
49+ needs : unit-tests
50+ timeout-minutes : 3
51+ steps :
52+ - uses : actions/checkout@v4
53+
54+ - uses : actions/setup-node@v4
55+ with :
56+ node-version : latest
57+
58+ - run : |
59+ ./release.sh
60+ env:
61+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62+ TAG: ${{ github.ref_name }}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu
4+
5+ # get internal version
6+ VERSION=` node -p " require('./package.json').version" `
7+
8+ if [ " $TAG " != " v$VERSION " ]; then
9+ echo " ERROR: tag ${TAG} does not match package version ${VERSION} "
10+ exit 255
11+ fi
12+
13+ npm set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
14+ npm publish --access public
You can’t perform that action at this time.
0 commit comments