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+ name : Publish to npm
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v[0-9]*.[0-9]*.[0-9]*'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : 20
16+ registry-url : ' https://registry.npmjs.org'
17+
18+ - name : Install dependencies
19+ run : npm install --legacy-peer-deps
20+
21+ - name : Build
22+ run : npm run build
23+
24+ - name : Run tests
25+ run : npm test
26+ env :
27+ LING_1T_API_KEY : ${{ secrets.LING_1T_API_KEY }}
28+
29+ - name : Publish to NPM
30+ run : |
31+ if [[ "${{ github.ref_name }}" == *"-alpha"* ]]; then
32+ npm publish --tag alpha
33+ elif [[ "${{ github.ref_name }}" == *"-beta"* ]]; then
34+ npm publish --tag beta
35+ else
36+ npm publish
37+ fi
38+ env :
39+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments