File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ RUN mkdir -p .config/git \
99 && echo ".vscode/*" >> .config/git/ignore \
1010 && echo "*.code-workspace" >> .config/git/ignore \
1111 && echo ".history/" >> .config/git/ignore
12+
13+ RUN echo '//npm.pkg.github.com/:_authToken=${GH_TOKEN}' > .npmrc
Original file line number Diff line number Diff line change @@ -3,14 +3,17 @@ name: Setup
33description : Setup Node.js and install dependencies.
44
55inputs :
6+ node_auth_token :
7+ description : The Node.js auth token.
8+ required : true
69 node_version :
710 description : The Node.js version.
811 required : false
912 default : ' 18'
1013 registry_url :
1114 description : The Node.js package registry URL.
1215 required : false
13- default : https://registry.npmjs.org
16+ default : https://npm.pkg.github.com
1417 install_dependencies :
1518 description : Install dependencies.
1619 required : false
3538 - name : Install dependencies
3639 if : inputs.install_dependencies == 'true'
3740 shell : bash
38- run : npm ci
41+ run : npm ci --ignore-scripts
42+ env :
43+ NODE_AUTH_TOKEN : ${{ inputs.node_auth_token }}
44+ - name : Rebuild Node.js modules
45+ shell : bash
46+ run : npm rebuild
47+ - name : Run postinstall script
48+ shell : bash
49+ run : npm run postinstall --if-present
50+ - name : Run prepare script
51+ shell : bash
52+ run : npm run prepare --if-present
Original file line number Diff line number Diff line change 2626 uses : ./.github/actions/setup
2727 with :
2828 node_version : ${{ inputs.node_version }}
29+ node_auth_token : ${{ secrets.GH_TOKEN }}
2930 - name : Build
3031 run : npm run build
3132 - name : Package
Original file line number Diff line number Diff line change 2929 uses : ./.github/actions/setup
3030 with :
3131 install_dependencies : ' false'
32+ node_auth_token : ${{ secrets.GH_TOKEN }}
3233 - name : Download artifact
3334 uses : actions/download-artifact@v3
3435 with :
Original file line number Diff line number Diff line change 3535 uses : ./.github/actions/setup
3636 with :
3737 node_version : ${{ matrix.node }}
38+ node_auth_token : ${{ secrets.GH_TOKEN }}
3839 - name : Test
3940 run : npm test
4041 lint :
5455 uses : ./.github/actions/setup
5556 with :
5657 node_version : ${{ matrix.node }}
58+ node_auth_token : ${{ secrets.GH_TOKEN }}
5759 - name : Lint
5860 run : npm run lint
5961 build :
@@ -111,7 +113,18 @@ jobs:
111113 contents : |
112114 import '@seamapi/makenew-tsmodule'
113115 - name : Install
114- run : npm install --save ${{ steps.packages.outputs.paths }}
116+ run : npm install --ignore-scripts --save ${{ steps.packages.outputs.paths }}
117+ env :
118+ NODE_AUTH_TOKEN : ${{ secrets.GH_TOKEN }}
119+ - name : Rebuild Node.js modules
120+ shell : bash
121+ run : npm rebuild
122+ - name : Run postinstall script
123+ shell : bash
124+ run : npm run postinstall --if-present
125+ - name : Run prepare script
126+ shell : bash
127+ run : npm run prepare --if-present
115128 - name : Run
116129 run : node index.js
117130 typecheck :
@@ -131,5 +144,6 @@ jobs:
131144 uses : ./.github/actions/setup
132145 with :
133146 node_version : ${{ matrix.node }}
147+ node_auth_token : ${{ secrets.GH_TOKEN }}
134148 - name : Typecheck
135149 run : npm run typecheck
Original file line number Diff line number Diff line change 2929 passphrase : ${{ secrets.GPG_PASSPHRASE }}
3030 - name : Setup
3131 uses : ./.github/actions/setup
32+ with :
33+ node_auth_token : ${{ secrets.GH_TOKEN }}
3234 - name : Format
3335 run : npm run format
3436 - name : Commit
Original file line number Diff line number Diff line change 3232 with :
3333 install_dependencies : ' false'
3434 - name : Normalize package-lock.json
35- run : npm install
35+ run : npm install --ignore-scripts
36+ env :
37+ NODE_AUTH_TOKEN : ${{ secrets.GH_TOKEN }}
3638 - name : Commit
3739 uses : stefanzweifel/git-auto-commit-action@v4
3840 with :
Original file line number Diff line number Diff line change 3131 passphrase : ${{ secrets.GPG_PASSPHRASE }}
3232 - name : Setup
3333 uses : ./.github/actions/setup
34+ with :
35+ node_auth_token : ${{ secrets.GH_TOKEN }}
3436 - name : Cut ${{ github.event.inputs.version }} version
3537 run : npm version --sign-git-tag=true ${{ github.event.inputs.version }}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ package
2222.tern-port
2323
2424# npm config
25- .npmrc
25+ # .npmrc
2626
2727# Temporary development files
2828tmp
Original file line number Diff line number Diff line change 1+ @seamapi:registry = https://npm.pkg.github.com
You can’t perform that action at this time.
0 commit comments