File tree Expand file tree Collapse file tree 12 files changed +51
-7
lines changed Expand file tree Collapse file tree 12 files changed +51
-7
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ RUN mkdir -p .config/git \
9
9
&& echo ".vscode/*" >> .config/git/ignore \
10
10
&& echo "*.code-workspace" >> .config/git/ignore \
11
11
&& 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
3
3
description : Setup Node.js and install dependencies.
4
4
5
5
inputs :
6
+ node_auth_token :
7
+ description : The Node.js auth token.
8
+ required : true
6
9
node_version :
7
10
description : The Node.js version.
8
11
required : false
9
12
default : ' 18'
10
13
registry_url :
11
14
description : The Node.js package registry URL.
12
15
required : false
13
- default : https://registry.npmjs.org
16
+ default : https://npm.pkg.github.com
14
17
install_dependencies :
15
18
description : Install dependencies.
16
19
required : false
35
38
- name : Install dependencies
36
39
if : inputs.install_dependencies == 'true'
37
40
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 26
26
uses : ./.github/actions/setup
27
27
with :
28
28
node_version : ${{ inputs.node_version }}
29
+ node_auth_token : ${{ secrets.GH_TOKEN }}
29
30
- name : Build
30
31
run : npm run build
31
32
- name : Package
Original file line number Diff line number Diff line change 29
29
uses : ./.github/actions/setup
30
30
with :
31
31
install_dependencies : ' false'
32
+ node_auth_token : ${{ secrets.GH_TOKEN }}
32
33
- name : Download artifact
33
34
uses : actions/download-artifact@v3
34
35
with :
Original file line number Diff line number Diff line change 35
35
uses : ./.github/actions/setup
36
36
with :
37
37
node_version : ${{ matrix.node }}
38
+ node_auth_token : ${{ secrets.GH_TOKEN }}
38
39
- name : Test
39
40
run : npm test
40
41
lint :
54
55
uses : ./.github/actions/setup
55
56
with :
56
57
node_version : ${{ matrix.node }}
58
+ node_auth_token : ${{ secrets.GH_TOKEN }}
57
59
- name : Lint
58
60
run : npm run lint
59
61
build :
@@ -111,7 +113,18 @@ jobs:
111
113
contents : |
112
114
import '@seamapi/makenew-tsmodule'
113
115
- 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
115
128
- name : Run
116
129
run : node index.js
117
130
typecheck :
@@ -131,5 +144,6 @@ jobs:
131
144
uses : ./.github/actions/setup
132
145
with :
133
146
node_version : ${{ matrix.node }}
147
+ node_auth_token : ${{ secrets.GH_TOKEN }}
134
148
- name : Typecheck
135
149
run : npm run typecheck
Original file line number Diff line number Diff line change 29
29
passphrase : ${{ secrets.GPG_PASSPHRASE }}
30
30
- name : Setup
31
31
uses : ./.github/actions/setup
32
+ with :
33
+ node_auth_token : ${{ secrets.GH_TOKEN }}
32
34
- name : Format
33
35
run : npm run format
34
36
- name : Commit
Original file line number Diff line number Diff line change 32
32
with :
33
33
install_dependencies : ' false'
34
34
- name : Normalize package-lock.json
35
- run : npm install
35
+ run : npm install --ignore-scripts
36
+ env :
37
+ NODE_AUTH_TOKEN : ${{ secrets.GH_TOKEN }}
36
38
- name : Commit
37
39
uses : stefanzweifel/git-auto-commit-action@v4
38
40
with :
Original file line number Diff line number Diff line change 31
31
passphrase : ${{ secrets.GPG_PASSPHRASE }}
32
32
- name : Setup
33
33
uses : ./.github/actions/setup
34
+ with :
35
+ node_auth_token : ${{ secrets.GH_TOKEN }}
34
36
- name : Cut ${{ github.event.inputs.version }} version
35
37
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
22
22
.tern-port
23
23
24
24
# npm config
25
- .npmrc
25
+ # .npmrc
26
26
27
27
# Temporary development files
28
28
tmp
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