Skip to content

Commit 5594ac6

Browse files
committed
Use corepack in CI
1 parent cd3f414 commit 5594ac6

File tree

11 files changed

+67
-198
lines changed

11 files changed

+67
-198
lines changed

.github/workflows/audit.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repo
15-
uses: actions/checkout@v4
16-
- uses: pnpm/action-setup@v4
17-
name: Install pnpm
15+
uses: actions/checkout@v5
16+
- name: Enable Corepack
17+
run: corepack enable
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
1820
with:
19-
version: 9
20-
run_install: false
21+
node-version-file: '.nvmrc'
22+
cache: pnpm
23+
2124
- name: Audit for vulnerabilities
2225
run: pnpx audit-ci@^7 --config ./audit-ci.jsonc

.github/workflows/build-docs.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,14 @@ jobs:
1212
GH_URL: http://example.test
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
16-
- name: Setup NodeJS
17-
uses: actions/setup-node@v4
15+
uses: actions/checkout@v5
16+
- name: Enable Corepack
17+
run: corepack enable
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
1820
with:
1921
node-version-file: '.nvmrc'
20-
- uses: pnpm/action-setup@v2
21-
name: Install pnpm
22-
with:
23-
version: 9
24-
run_install: false
25-
- name: Get pnpm store directory
26-
shell: bash
27-
run: |
28-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29-
- uses: actions/cache@v3
30-
name: Setup pnpm cache
31-
with:
32-
path: ${{ env.STORE_PATH }}
33-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34-
restore-keys: |
35-
${{ runner.os }}-pnpm-store-
22+
cache: pnpm
3623
- name: Install dependencies
3724
run: pnpm install
3825
- name: Build Packages

.github/workflows/build-packages.yaml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,17 @@ jobs:
1010
name: Build Packages
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
persist-credentials: false
1616

17-
- name: Setup NodeJS
18-
uses: actions/setup-node@v4
17+
- name: Enable Corepack
18+
run: corepack enable
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v6
1921
with:
2022
node-version-file: '.nvmrc'
21-
22-
- uses: pnpm/action-setup@v2
23-
name: Install pnpm
24-
with:
25-
version: 9
26-
run_install: false
27-
28-
- name: Get pnpm store directory
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
33-
- uses: actions/cache@v3
34-
name: Setup pnpm cache
35-
with:
36-
path: ${{ env.STORE_PATH }}
37-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-pnpm-store-
23+
cache: pnpm
4024

4125
- name: Install dependencies
4226
run: pnpm install

.github/workflows/deploy-docs.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,14 @@ jobs:
2727
GH_PROJECT_NAME: ${{vars.GH_PROJECT_NAME}}
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
31-
- name: Setup NodeJS
32-
uses: actions/setup-node@v4
30+
uses: actions/checkout@v5
31+
- name: Enable Corepack
32+
run: corepack enable
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v6
3335
with:
3436
node-version-file: '.nvmrc'
35-
- uses: pnpm/action-setup@v2
36-
name: Install pnpm
37-
with:
38-
version: 9
39-
run_install: false
40-
- name: Get pnpm store directory
41-
shell: bash
42-
run: |
43-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
44-
- uses: actions/cache@v3
45-
name: Setup pnpm cache
46-
with:
47-
path: ${{ env.STORE_PATH }}
48-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49-
restore-keys: |
50-
${{ runner.os }}-pnpm-store-
37+
cache: pnpm
5138
- name: Install dependencies
5239
run: pnpm install
5340
- name: Build Packages

.github/workflows/dev-packages.yaml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,16 @@ jobs:
99
name: Publish Dev Packages
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
with:
1414
persist-credentials: false
15-
- name: Setup NodeJS
16-
uses: actions/setup-node@v4
15+
- name: Enable Corepack
16+
run: corepack enable
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v6
1719
with:
1820
node-version-file: '.nvmrc'
19-
- uses: pnpm/action-setup@v2
20-
name: Install pnpm
21-
with:
22-
version: 9
23-
run_install: false
24-
- name: Add NPM auth
25-
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
26-
- name: Get pnpm store directory
27-
shell: bash
28-
run: |
29-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30-
- uses: actions/cache@v3
31-
name: Setup pnpm cache
32-
with:
33-
path: ${{ env.STORE_PATH }}
34-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35-
restore-keys: |
36-
${{ runner.os }}-pnpm-store-
21+
cache: pnpm
3722
- name: Install dependencies
3823
run: pnpm install
3924
- name: Build

.github/workflows/diagnostics-image-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v3

.github/workflows/diagnostics-image-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.ref == 'refs/heads/main'
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Set up Docker Buildx
2323
uses: docker/setup-buildx-action@v3

.github/workflows/release.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,13 @@ jobs:
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version-file: '.nvmrc'
21-
- uses: pnpm/action-setup@v2
22-
name: Install pnpm
23-
with:
24-
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
25-
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
26-
version: 9.3
27-
run_install: false
28-
- name: Get pnpm store directory
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
- uses: actions/cache@v3
33-
name: Setup pnpm cache
21+
- name: Enable Corepack
22+
run: corepack enable
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v6
3425
with:
35-
path: ${{ env.STORE_PATH }}
36-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pnpm-store-
26+
node-version-file: '.nvmrc'
27+
cache: pnpm
3928
- name: Install dependencies
4029
run: pnpm install
4130
- name: Create Release Pull Request or Publish to npm

.github/workflows/test-isolated.yaml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ jobs:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 30
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
persist-credentials: false
1616

17-
- name: Setup NodeJS
18-
uses: actions/setup-node@v4
17+
- name: Enable Corepack
18+
run: corepack enable
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v6
1921
with:
20-
node-version-file: ".nvmrc"
22+
node-version-file: '.nvmrc'
23+
cache: pnpm
2124

22-
- name: Set up JDK 17
25+
- name: Set up JDK 21
2326
uses: actions/setup-java@v4
2427
with:
2528
java-version: "21"
@@ -28,27 +31,6 @@ jobs:
2831
- name: Set up Gradle
2932
uses: gradle/actions/setup-gradle@v4
3033

31-
- uses: pnpm/action-setup@v2
32-
name: Install pnpm
33-
with:
34-
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
35-
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
36-
version: 9.3
37-
run_install: false
38-
39-
- name: Get pnpm store directory
40-
shell: bash
41-
run: |
42-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
43-
44-
- uses: actions/cache@v3
45-
name: Setup pnpm cache
46-
with:
47-
path: ${{ env.STORE_PATH }}
48-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49-
restore-keys: |
50-
${{ runner.os }}-pnpm-store-
51-
5234
- name: Install
5335
run: pnpm install
5436

.github/workflows/test-simulators.yaml

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
outputs:
1111
should_run: ${{ steps.check.outputs.should_run }}
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
1616
- name: Check for changes
@@ -32,7 +32,7 @@ jobs:
3232
env:
3333
AVD_NAME: ubuntu-avd-x86_64-31
3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v5
3636
with:
3737
persist-credentials: false
3838

@@ -61,29 +61,13 @@ jobs:
6161
distribution: 'adopt'
6262
cache: 'gradle'
6363

64-
- name: Setup NodeJS
65-
uses: actions/setup-node@v4
64+
- name: Enable Corepack
65+
run: corepack enable
66+
- name: Setup Node.js
67+
uses: actions/setup-node@v6
6668
with:
6769
node-version-file: '.nvmrc'
68-
69-
- uses: pnpm/action-setup@v2
70-
name: Install pnpm
71-
with:
72-
version: 9
73-
run_install: false
74-
75-
- name: Get pnpm store directory
76-
shell: bash
77-
run: |
78-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
79-
80-
- uses: actions/cache@v3
81-
name: Setup pnpm cache
82-
with:
83-
path: ${{ env.STORE_PATH }}
84-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
85-
restore-keys: |
86-
${{ runner.os }}-pnpm-store-
70+
cache: pnpm
8771

8872
- name: Install dependencies
8973
run: pnpm install
@@ -138,7 +122,7 @@ jobs:
138122
timeout-minutes: 30
139123

140124
steps:
141-
- uses: actions/checkout@v4
125+
- uses: actions/checkout@v5
142126
with:
143127
persist-credentials: false
144128

@@ -165,29 +149,13 @@ jobs:
165149
restore-keys: |
166150
xcode-derived-${{ runner.os }}-
167151
168-
- name: Setup NodeJS
169-
uses: actions/setup-node@v4
152+
- name: Enable Corepack
153+
run: corepack enable
154+
- name: Setup Node.js
155+
uses: actions/setup-node@v6
170156
with:
171157
node-version-file: '.nvmrc'
172-
173-
- uses: pnpm/action-setup@v2
174-
name: Install pnpm
175-
with:
176-
version: 9
177-
run_install: false
178-
179-
- name: Get pnpm store directory
180-
shell: bash
181-
run: |
182-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
183-
184-
- uses: actions/cache@v3
185-
name: Setup pnpm cache
186-
with:
187-
path: ${{ env.STORE_PATH }}
188-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
189-
restore-keys: |
190-
${{ runner.os }}-pnpm-store-
158+
cache: pnpm
191159

192160
- name: Install dependencies
193161
run: pnpm install

0 commit comments

Comments
 (0)