File tree Expand file tree Collapse file tree 5 files changed +18
-10
lines changed Expand file tree Collapse file tree 5 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : Continuous deployment (NPM)
2
2
3
3
on :
4
- workflow_dispatch :
5
- push :
6
- tags :
7
- - ' *'
4
+ workflow_call :
5
+ inputs :
6
+ ref :
7
+ required : true
8
+ type : string
8
9
9
10
jobs :
10
11
build-and-deploy :
14
15
- name : Checkout repo
15
16
uses : actions/checkout@v3
16
17
with :
17
- fetch-depth : ' 1 '
18
+ ref : ${{ inputs.ref }}
18
19
19
20
- name : Configure node for npmjs.org as registry
20
21
uses : actions/setup-node@v3
23
24
registry-url : ' https://registry.npmjs.org'
24
25
25
26
- name : Install dependencies
26
- run : npm ci --legacy-peer-deps
27
+ run : npm ci
27
28
28
29
- name : Build
29
30
run : npm run build
Original file line number Diff line number Diff line change 19
19
steps :
20
20
- name : Checkout
21
21
uses : actions/checkout@v3
22
+
22
23
- name : Setup Pages
23
24
uses : actions/configure-pages@v3
24
25
28
29
node-version : ' 18.x'
29
30
30
31
- name : Install dependencies
31
- run : npm ci --legacy-peer-deps
32
+ run : npm ci
32
33
33
34
- name : Build storybook
34
35
run : npm run build:storybook
Original file line number Diff line number Diff line change 21
21
node-version : ' 18.x'
22
22
23
23
- name : Install dependencies
24
- run : npm ci --legacy-peer-deps
24
+ run : npm ci
25
25
26
26
- uses : andresz1/size-limit-action@v1
27
27
with :
Original file line number Diff line number Diff line change 14
14
runs-on : ${{ matrix.os }}
15
15
strategy :
16
16
matrix :
17
- node : ['18.x']
17
+ node : ['18.x', '20.x' ]
18
18
os : [ubuntu-latest, windows-latest, macOS-latest]
19
19
20
20
steps :
28
28
cache : npm
29
29
30
30
- name : Install dependencies
31
- run : npm ci --legacy-peer-deps
31
+ run : npm ci
32
32
33
33
- name : Check format
34
34
run : npm run check:format
Original file line number Diff line number Diff line change 15
15
with :
16
16
release-type : node
17
17
package-name : react-alternating-timeline
18
+
19
+ - name : Call for deployment
20
+ uses : ./.github/workflows/cd-npm.yml
21
+ with :
22
+ ref : refs/tags/${{ steps.release.outputs.tag_name }}
23
+ if : ${{ steps.release.outputs.releases_created }}
You can’t perform that action at this time.
0 commit comments