Skip to content

Commit 4389723

Browse files
authored
chore: enhance continuous integration and deployment (#123)
* chore: stop installing legacy peer deps * chore: reuse cd-npm after release-please * chore: run ci on node 20
1 parent c486a22 commit 4389723

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

.github/workflows/cd-npm.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Continuous deployment (NPM)
22

33
on:
4-
workflow_dispatch:
5-
push:
6-
tags:
7-
- '*'
4+
workflow_call:
5+
inputs:
6+
ref:
7+
required: true
8+
type: string
89

910
jobs:
1011
build-and-deploy:
@@ -14,7 +15,7 @@ jobs:
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
@@ -23,7 +24,7 @@ jobs:
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

.github/workflows/cd-storybook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v3
22+
2223
- name: Setup Pages
2324
uses: actions/configure-pages@v3
2425

@@ -28,7 +29,7 @@ jobs:
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

.github/workflows/check-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
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:

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
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:
@@ -28,7 +28,7 @@ jobs:
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

.github/workflows/release-please.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ jobs:
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 }}

0 commit comments

Comments
 (0)