File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Publish to Linux
4+ name : Publish binary to Linux
55
66on :
77 create :
2929 node-version : ${{ matrix.node-version }}
3030 - name : install NPM dependencies and build native binary
3131 run : yarn
32+ - name : remove native built artifact before publishing
33+ run : rm native/index.node && rm native/artifacts.json && rm -rf native/target
3234 - name : Package native binary and upload to github
3335 run : npm run upload-binary
3436 env :
3537 NODE_PRE_GYP_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36- - name : remove native/index.node before publishing
37- run : rm native/index.node
38- - name : Publish to NPM
39- run : echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc && npm publish --access=public
40- if : ${{ matrix.node-version == '12.x' }}
41- env :
42- NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
Original file line number Diff line number Diff line change 3131 node-version : ${{ matrix.node-version }}
3232 - name : install NPM dependencies and build native binary
3333 run : yarn
34+ - name : remove native built artifact before publishing
35+ run : rm native/index.node && rm native/artifacts.json && rm -rf native/target
3436 - name : Package native binary and upload to github
3537 run : npm run upload-binary
3638 env :
Original file line number Diff line number Diff line change 1+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+ name : Publish to NPM
5+
6+ on :
7+ create :
8+ tags :
9+ - v*
10+
11+ jobs :
12+ build :
13+
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Use Node.js 12.x
19+ uses : actions/setup-node@v1
20+ with :
21+ node-version : 12.x
22+ - name : install NPM dependencies only
23+ run : yarn install --ignore-scripts
24+ - run : yarn build:typescript
25+ - name : Publish to NPM
26+ run : echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc && npm publish --access=public
27+ env :
28+ NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
Original file line number Diff line number Diff line change 2929 node-version : ${{ matrix.node-version }}
3030 - name : install NPM dependencies and build native binary
3131 run : yarn
32+ - name : remove native built artifact before publishing
33+ run : rm native/index.node && rm native/artifacts.json && rm -rf native/target
3234 - name : Package native binary and upload to github
3335 run : npm run upload-binary
3436 env :
You can’t perform that action at this time.
0 commit comments