Skip to content

Commit 77cf070

Browse files
authored
chore(repo): update pnpm and workflows (#291)
1 parent f2779a0 commit 77cf070

File tree

10 files changed

+97
-286
lines changed

10 files changed

+97
-286
lines changed

.github/actions/setup/action.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Setup
2+
description: Sets up the CI environment
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- uses: actions/checkout@v2
8+
with:
9+
fetch-depth: 0
10+
11+
- name: Setup Moon
12+
uses: moonrepo/setup-toolchain@v0
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 20
18+
19+
- name: Install PNPM
20+
uses: pnpm/action-setup@v4
21+
22+
- name: Sanity Check
23+
shell: bash
24+
run: |
25+
echo $'.\n.\n============\nSanity Check\n============\n'
26+
echo git `git version`;
27+
echo branch `git branch --show-current`;
28+
echo `moon --version`
29+
echo node `node -v`;
30+
echo pnpm `pnpm -v`
31+
echo $'============\n.\n.'
32+
33+
- name: pnpm install
34+
shell: bash
35+
run: pnpm install --frozen-lockfile

.github/workflows/release.yml

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -42,48 +42,8 @@ jobs:
4242
git config --global user.name "Release Workflow"
4343
git remote set-url origin https://github.com/${{ github.repository }}
4444
45-
- name: Setup Node
46-
uses: actions/setup-node@v3
47-
with:
48-
node-version: 20
49-
50-
- name: Enable Corepack
51-
id: pnpm-setup
52-
run: |
53-
corepack enable
54-
corepack prepare pnpm@latest --activate
55-
pnpm config set script-shell "/usr/bin/bash"
56-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
57-
58-
- name: pnpm Cache
59-
uses: actions/cache@v3
60-
with:
61-
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
62-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
63-
restore-keys: |
64-
${{ runner.os }}-pnpm-store-
65-
66-
- name: ESLint Cache
67-
uses: actions/cache@v3
68-
with:
69-
path: ./.eslintcache
70-
key: ${{ runner.os }}-eslintcache-${{ hashFiles('./eslintcache') }}
71-
restore-keys: |
72-
${{ runner.os }}-eslintcache-
73-
74-
- name: Setup Moon
75-
uses: moonrepo/setup-toolchain@v0
76-
77-
- name: Sanity Check
78-
run: |
79-
echo git `git version`;
80-
echo branch `git branch --show-current`;
81-
echo node `node -v`;
82-
echo pnpm `pnpm -v`
83-
echo `moon --version`
84-
85-
- name: pnpm install
86-
run: pnpm install --frozen-lockfile
45+
- name: Setup
46+
uses: ./.github/actions/setup
8747

8848
- name: Build Projects
8949
run: |

.github/workflows/test-cli.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 10
2525

26-
# Needed for https://github.com/moonrepo/moon/issues/1060
27-
- name: Force Update Main
26+
- name: Checkout Main
2827
run: |
2928
git fetch origin
3029
git branch -f main origin/main
3130
32-
- name: Setup Node
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 20
36-
37-
- name: Enable Corepack
38-
id: pnpm-setup
39-
run: |
40-
corepack enable
41-
corepack prepare pnpm@latest --activate
42-
pnpm config set script-shell "/usr/bin/bash"
43-
44-
- name: Setup Moon
45-
uses: moonrepo/setup-toolchain@v0
46-
47-
- name: Sanity Check
48-
run: |
49-
echo git `git version`;
50-
echo branch `git branch --show-current`;
51-
echo node `node -v`;
52-
echo pnpm `pnpm -v`
53-
echo `moon --version`
54-
55-
- name: pnpm install
56-
run: pnpm install --frozen-lockfile
31+
- name: Setup
32+
uses: ./.github/actions/setup
5733

5834
- name: Build Projects
5935
run: |

.github/workflows/test-smoke.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 10
2525

26-
# Needed for https://github.com/moonrepo/moon/issues/1060
27-
- name: Force Update Main
26+
- name: Checkout Main
2827
run: |
2928
git fetch origin
3029
git branch -f main origin/main
3130
32-
- name: Setup Node
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 20
36-
37-
- name: Enable Corepack
38-
id: pnpm-setup
39-
run: |
40-
corepack enable
41-
corepack prepare pnpm@latest --activate
42-
pnpm config set script-shell "/usr/bin/bash"
43-
44-
- name: Setup Moon
45-
uses: moonrepo/setup-toolchain@v0
46-
47-
- name: Sanity Check
48-
run: |
49-
echo git `git version`;
50-
echo branch `git branch --show-current`;
51-
echo node `node -v`;
52-
echo pnpm `pnpm -v`
53-
echo `moon --version`
54-
55-
- name: pnpm install
56-
run: pnpm install --frozen-lockfile
31+
- name: Setup
32+
uses: ./.github/actions/setup
5733

5834
- name: Build Projects
5935
run: |

.github/workflows/test-v18.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 10
2525

26-
# Needed for https://github.com/moonrepo/moon/issues/1060
27-
- name: Force Update Main
26+
- name: Checkout Main
2827
run: |
2928
git fetch origin
3029
git branch -f main origin/main
3130
32-
- name: Setup Node
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 20
36-
37-
- name: Enable Corepack
38-
id: pnpm-setup
39-
run: |
40-
corepack enable
41-
corepack prepare pnpm@latest --activate
42-
pnpm config set script-shell "/usr/bin/bash"
43-
44-
- name: Setup Moon
45-
uses: moonrepo/setup-toolchain@v0
46-
47-
- name: Sanity Check
48-
run: |
49-
echo git `git version`;
50-
echo branch `git branch --show-current`;
51-
echo node `node -v`;
52-
echo pnpm `pnpm -v`
53-
echo `moon --version`
54-
55-
- name: pnpm install
56-
run: pnpm install --frozen-lockfile
31+
- name: Setup
32+
uses: ./.github/actions/setup
5733

5834
- name: Install React v18
5935
run: |

.github/workflows/test.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 10
2525

26-
# Needed for https://github.com/moonrepo/moon/issues/1060
27-
- name: Force Update Main
26+
- name: Checkout Main
2827
run: |
2928
git fetch origin
3029
git branch -f main origin/main
3130
32-
- name: Setup Node
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 20
36-
37-
- name: Enable Corepack
38-
id: pnpm-setup
39-
run: |
40-
corepack enable
41-
corepack prepare pnpm@latest --activate
42-
pnpm config set script-shell "/usr/bin/bash"
43-
44-
- name: Setup Moon
45-
uses: moonrepo/setup-toolchain@v0
46-
47-
- name: Sanity Check
48-
run: |
49-
echo git `git version`;
50-
echo branch `git branch --show-current`;
51-
echo node `node -v`;
52-
echo pnpm `pnpm -v`
53-
echo `moon --version`
54-
55-
- name: pnpm install
56-
run: pnpm install --frozen-lockfile
31+
- name: Setup
32+
uses: ./.github/actions/setup
5733

5834
- name: Build Projects
5935
run: |

.github/workflows/validate.yml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,45 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 10
2525

26-
# Needed for https://github.com/moonrepo/moon/issues/1060
27-
- name: Force Update Main
26+
- name: Checkout Main
2827
run: |
2928
git fetch origin
3029
git branch -f main origin/main
3130
32-
- name: Setup Node
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 20
36-
37-
- name: Enable Corepack
38-
id: pnpm-setup
39-
run: |
40-
corepack enable
41-
corepack prepare pnpm@latest --activate
42-
pnpm config set script-shell "/usr/bin/bash"
43-
44-
- name: ESLint Cache
45-
uses: actions/cache@v3
46-
with:
47-
path: ./.eslintcache
48-
key: ${{ runner.os }}-eslintcache-${{ hashFiles('./eslintcache') }}
49-
restore-keys: |
50-
${{ runner.os }}-eslintcache-
51-
52-
- name: Setup Moon
53-
uses: moonrepo/setup-toolchain@v0
54-
55-
- name: Sanity Check
56-
run: |
57-
echo git `git version`;
58-
echo branch `git branch --show-current`;
59-
echo node `node -v`;
60-
echo pnpm `pnpm -v`
61-
echo `moon --version`
62-
63-
- name: pnpm install
64-
run: pnpm install --frozen-lockfile
31+
- name: Setup
32+
uses: ./.github/actions/setup
6533

6634
- name: Build Projects
6735
run: |

.moon/toolchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ node:
1414

1515
# The version of the package manager (above) to use.
1616
pnpm:
17-
version: '9.1.1'
17+
version: '9.15.6'
1818

1919
# Add `node.version` as a constraint in the root `package.json` `engines`.
2020
addEnginesConstraint: true

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"devDependencies": {
1010
"@dot/versioner": "^0.3.4",
11-
"@moonrepo/cli": "^1.17.3",
11+
"@moonrepo/cli": "1.30.0",
1212
"@swc/core": "^1.3.91",
1313
"@swc/helpers": "^0.5.2",
1414
"@types/node": "20.6.2",
@@ -45,7 +45,7 @@
4545
"prettier --write"
4646
]
4747
},
48-
"packageManager": "pnpm@9.1.1",
48+
"packageManager": "pnpm@9.15.6",
4949
"pnpm": {
5050
"overrides": {
5151
"@types/react": "19.0.2",

0 commit comments

Comments
 (0)