Skip to content

Commit a3d9e68

Browse files
committed
Update CI workflows
1 parent a926906 commit a3d9e68

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.github/workflows/chromatic.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
name: "Chromatic"
1+
name: 'Chromatic'
22
on: push
33
jobs:
44
publish:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v3
7+
# https://github.com/actions/checkout
8+
- uses: actions/checkout@v4
89
with:
910
fetch-depth: 0
10-
- name: Install Node.js
11-
uses: actions/setup-node@v3
11+
12+
# https://nodejs.org/api/corepack.html
13+
- name: Enable corepack (for pnpm)
14+
run: corepack enable
15+
16+
# https://github.com/actions/setup-node
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
1219
with:
20+
cache: pnpm
1321
node-version: 20
14-
- name: Install dependencies
15-
uses: pnpm/action-setup@v2
16-
with:
17-
version: 8
18-
run_install: true
22+
23+
# https://pnpm.io/cli/install
24+
- name: Install Node.js dependencies with pnpm
25+
run: >
26+
pnpm install
27+
--frozen-lockfile
28+
1929
- name: Publish to Chromatic
2030
uses: chromaui/action@v1
2131
with:

.github/workflows/release.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
99
steps:
10-
- uses: actions/checkout@v3
10+
# https://github.com/actions/checkout
11+
- uses: actions/checkout@v4
1112

1213
- name: Prepare repository
1314
run: git fetch --unshallow --tags
@@ -17,16 +18,16 @@ jobs:
1718
git config --global user.name 'storybook-bot'
1819
git config --global user.email '[email protected]'
1920
20-
- name: Use Node.js 20.x
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: 20.x
21+
# https://nodejs.org/api/corepack.html
22+
- name: Enable corepack (for pnpm)
23+
run: corepack enable
2424

25-
- name: Install dependencies
26-
uses: pnpm/action-setup@v2
25+
# https://github.com/actions/setup-node
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
2728
with:
28-
version: 8
29-
run_install: true
29+
cache: pnpm
30+
node-version: 20
3031

3132
- name: Create Release
3233
env:

0 commit comments

Comments
 (0)