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 11name : Continuous deployment (NPM)
22
33on :
4- workflow_dispatch :
5- push :
6- tags :
7- - ' *'
4+ workflow_call :
5+ inputs :
6+ ref :
7+ required : true
8+ type : string
89
910jobs :
1011 build-and-deploy :
1415 - name : Checkout repo
1516 uses : actions/checkout@v3
1617 with :
17- fetch-depth : ' 1 '
18+ ref : ${{ inputs.ref }}
1819
1920 - name : Configure node for npmjs.org as registry
2021 uses : actions/setup-node@v3
2324 registry-url : ' https://registry.npmjs.org'
2425
2526 - name : Install dependencies
26- run : npm ci --legacy-peer-deps
27+ run : npm ci
2728
2829 - name : Build
2930 run : npm run build
Original file line number Diff line number Diff line change 1919 steps :
2020 - name : Checkout
2121 uses : actions/checkout@v3
22+
2223 - name : Setup Pages
2324 uses : actions/configure-pages@v3
2425
2829 node-version : ' 18.x'
2930
3031 - name : Install dependencies
31- run : npm ci --legacy-peer-deps
32+ run : npm ci
3233
3334 - name : Build storybook
3435 run : npm run build:storybook
Original file line number Diff line number Diff line change 2121 node-version : ' 18.x'
2222
2323 - name : Install dependencies
24- run : npm ci --legacy-peer-deps
24+ run : npm ci
2525
2626 - uses : andresz1/size-limit-action@v1
2727 with :
Original file line number Diff line number Diff line change 1414 runs-on : ${{ matrix.os }}
1515 strategy :
1616 matrix :
17- node : ['18.x']
17+ node : ['18.x', '20.x' ]
1818 os : [ubuntu-latest, windows-latest, macOS-latest]
1919
2020 steps :
2828 cache : npm
2929
3030 - name : Install dependencies
31- run : npm ci --legacy-peer-deps
31+ run : npm ci
3232
3333 - name : Check format
3434 run : npm run check:format
Original file line number Diff line number Diff line change 1515 with :
1616 release-type : node
1717 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