File tree Expand file tree Collapse file tree 5 files changed +47
-48
lines changed Expand file tree Collapse file tree 5 files changed +47
-48
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Setup
3
+ description : Setup Node.js and install dependencies.
4
+
5
+ inputs :
6
+ node_version :
7
+ description : The Node.js version
8
+ required : false
9
+ default : ' 16'
10
+ registry_url :
11
+ description : The Node.js package registry URL.
12
+ required : false
13
+ default : https://registry.npmjs.org
14
+
15
+ runs :
16
+ using : composite
17
+ steps :
18
+ - name : Setup Node.js
19
+ uses : actions/setup-node@v2
20
+ with :
21
+ cache : npm
22
+ node-version : ${{ inputs.node_version }}
23
+ registry-url : ${{ inputs.registry_url }}
24
+ - name : Install dependencies
25
+ shell : bash
26
+ run : npm ci
Original file line number Diff line number Diff line change 29
29
git_committer_email : ${{ secrets.GIT_USER_EMAIL }}
30
30
gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
31
31
passphrase : ${{ secrets.GPG_PASSPHRASE }}
32
- - name : Setup Node.js
33
- uses : actions/setup-node@v2
34
- with :
35
- node-version : ' 16'
36
- cache : npm
37
- registry-url : https://npm.pkg.github.com
38
- scope : ' @${{ github.repository_owner }}'
39
- - name : Install dependencies
40
- run : npm ci
32
+ - name : Setup
33
+ uses : ./.github/actions/setup
41
34
- name : Format
42
35
run : npm run format
43
36
- name : Commit
Original file line number Diff line number Diff line change @@ -18,13 +18,10 @@ jobs:
18
18
steps :
19
19
- name : Checkout
20
20
uses : actions/checkout@v2
21
- - name : Setup Node.js
22
- uses : actions/setup-node@v2
21
+ - name : Setup
22
+ uses : ./.github/ actions/setup
23
23
with :
24
- node-version : ${{ matrix.node }}
25
- cache : npm
26
- - name : Install dependencies
27
- run : npm ci
24
+ node_version : ${{ matrix.node }}
28
25
- name : Test
29
26
run : npm test
30
27
lint :
@@ -38,13 +35,10 @@ jobs:
38
35
steps :
39
36
- name : Checkout
40
37
uses : actions/checkout@v2
41
- - name : Setup Node.js
42
- uses : actions/setup-node@v2
38
+ - name : Setup
39
+ uses : ./.github/ actions/setup
43
40
with :
44
- node-version : ${{ matrix.node }}
45
- cache : npm
46
- - name : Install dependencies
47
- run : npm ci
41
+ node_version : ${{ matrix.node }}
48
42
- name : Lint
49
43
run : npm run lint
50
44
build :
58
52
steps :
59
53
- name : Checkout
60
54
uses : actions/checkout@v2
61
- - name : Setup Node.js
62
- uses : actions/setup-node@v2
55
+ - name : Setup
56
+ uses : ./.github/ actions/setup
63
57
with :
64
- node-version : ${{ matrix.node }}
65
- cache : npm
66
- - name : Install dependencies
67
- run : npm ci
58
+ node_version : ${{ matrix.node }}
68
59
- name : Build
69
60
run : npm run build
Original file line number Diff line number Diff line change @@ -12,12 +12,11 @@ jobs:
12
12
steps :
13
13
- name : Checkout
14
14
uses : actions/checkout@v2
15
- - name : Setup Node.js
16
- uses : actions/setup-node@v2
15
+ - name : Setup
16
+ uses : ./.github/ actions/setup
17
17
with :
18
- node-version : ' 12'
19
- cache : npm
20
- registry-url : https://registry.npmjs.org
18
+ node_version : ' 12'
19
+ registry_url : https://registry.npmjs.org
21
20
- name : Check version
22
21
id : version
23
22
run : |
26
25
echo "::set-output name=published::$(npm view $(jq -r '.name' package.json)@$(jq -r '.version' package.json) version)"
27
26
env :
28
27
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
29
- - name : Install dependencies
30
- run : npm ci
31
28
- name : Build
32
29
run : npn run build
33
30
- name : Publish ${{ steps.version.outputs.name }}@${{ steps.version.outputs.current }}
@@ -40,12 +37,11 @@ jobs:
40
37
steps :
41
38
- name : Checkout
42
39
uses : actions/checkout@v2
43
- - name : Setup Node.js
44
- uses : actions/setup-node@v2
40
+ - name : Setup
41
+ uses : ./.github/ actions/setup
45
42
with :
46
- node-version : ' 12'
47
- cache : npm
48
- registry-url : https://npm.pkg.github.com
43
+ node_version : ' 12'
44
+ registry_url : https://npm.pkg.github.com
49
45
- name : Check version
50
46
id : version
51
47
run : |
54
50
echo "::set-output name=published::$(npm view $(jq -r '.name' package.json)@$(jq -r '.version' package.json) version)"
55
51
env :
56
52
NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
- - name : Install dependencies
58
- run : npm ci
59
53
- name : Build
60
54
run : npm run build
61
55
- name : Publish ${{ steps.version.outputs.name }}@${{ steps.version.outputs.current }}
Original file line number Diff line number Diff line change 40
40
git_committer_email : ${{ secrets.GIT_USER_EMAIL }}
41
41
gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
42
42
passphrase : ${{ secrets.GPG_PASSPHRASE }}
43
- - name : Setup Node.js
44
- uses : actions/setup-node@v2
45
- with :
46
- node-version : ' 16'
47
- cache : npm
48
- - name : Install dependencies
49
- run : npm ci
43
+ - name : Setup
44
+ uses : ./.github/actions/setup
50
45
- name : Cut ${{ github.event.inputs.version }}${{ github.event.client_payload.version }} version
51
46
run : npm version ${{ github.event.inputs.version }}${{ github.event.client_payload.version }}
You can’t perform that action at this time.
0 commit comments