Skip to content

Commit abaf21a

Browse files
committed
Chore: Update yarn to 4.9.1 and refactor CI
1 parent 93841d4 commit abaf21a

File tree

8 files changed

+979
-953
lines changed

8 files changed

+979
-953
lines changed

.github/actions/node-setup/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ runs:
2222
- uses: actions/cache@v4
2323
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2424
with:
25-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25+
path: |
26+
${{ steps.yarn-cache-dir-path.outputs.dir }}
27+
.yarn/unplugged
28+
.yarn/build-state.yml
29+
.yarn/install-state.gz
2630
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2731
restore-keys: |
2832
${{ runner.os }}-yarn-
2933
3034
- name: Package Install
3135
run: |
36+
yarn config set winLinkType symlinks
3237
if [ "${{ inputs.strict }}" = "true" ]; then
3338
yarn install --immutable --check-resolutions --refresh-lockfile
3439
yarn constraints

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
- name: Setup
3333
uses: ./.github/actions/node-setup
3434

35-
- name: More setup cache
36-
uses: ./.github/actions/cache-dir
37-
with:
38-
key: checker
39-
4035
- name: Typechecker
4136
run: yarn build:type
4237

.github/workflows/fast-forward.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
COMMENT_BODY: ${{ github.event.comment.body }}
2525
run: |
2626
if [[ "$COMMENT_BODY" =~ (^|[[:space:]])/fast-forward($|[[:space:]]) ]]; then
27-
echo "MATCH=true" >> $GITHUB_ENV
27+
echo "MATCH=true" >> $GITHUB_OUTPUT
2828
else
29-
echo "MATCH=false" >> $GITHUB_ENV
29+
echo "MATCH=false" >> $GITHUB_OUTPUT
3030
fi
3131
3232
- name: Fast forwarding
33-
if: env.MATCH == 'true'
33+
if: ${{ steps.check_comment.outputs.MATCH == 'true' }}
3434
uses: sequoia-pgp/fast-forward@v1
3535
with:
3636
merge: true
@@ -41,7 +41,7 @@ jobs:
4141
comment: always
4242

4343
- name: Check target branch
44-
if: env.MATCH == 'true'
44+
if: ${{ steps.check_comment.outputs.MATCH == 'true' }}
4545
id: check_branch
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -113,11 +113,21 @@ jobs:
113113
statuses: write
114114

115115
steps:
116+
- name: Get PR Branch
117+
id: get_pr_branch
118+
run: |
119+
PR_NUMBER=${{ github.event.issue.number }}
120+
PR_BRANCH=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
121+
"https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" \
122+
| jq -r .head.ref)
123+
124+
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT
125+
116126
- name: Checkout Repo
117127
uses: actions/checkout@v4
118128
with:
119129
fetch-depth: 0
120-
ref: main
130+
ref: ${{ steps.get_pr_branch.outputs.branch }}
121131

122132
- name: Setup
123133
uses: ./.github/actions/node-setup

.github/workflows/rebase.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ jobs:
2222
COMMENT_BODY: ${{ github.event.comment.body }}
2323
run: |
2424
if [[ "$COMMENT_BODY" =~ (^|[[:space:]])/rebase($|[[:space:]]) ]]; then
25-
echo "MATCH=true" >> $GITHUB_ENV
25+
echo "MATCH=true" >> $GITHUB_OUTPUT
2626
else
27-
echo "MATCH=false" >> $GITHUB_ENV
27+
echo "MATCH=false" >> $GITHUB_OUTPUT
2828
fi
2929
3030
- name: Checkout repository
31-
if: env.MATCH == 'true'
31+
if: ${{ steps.check_comment.outputs.MATCH == 'true' }}
3232
uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0
3535

3636
- name: Install git-branchless
37-
if: env.MATCH == 'true'
37+
if: ${{ steps.check_comment.outputs.MATCH == 'true' }}
3838
run: |
3939
brew install --no-quarantine git-branchless
4040
git-branchless init
4141
4242
- name: Rebase PR
43-
if: env.MATCH == 'true'
43+
if: ${{ steps.check_comment.outputs.MATCH == 'true' }}
4444
run: |
4545
git config user.name "github-actions[bot]"
4646
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

.yarn/releases/yarn-4.6.0.cjs

Lines changed: 0 additions & 934 deletions
This file was deleted.

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 948 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ enableGlobalCache: true
88

99
enableHardenedMode: false
1010

11-
globalFolder: ./.yarn/cache
11+
globalFolder: ./.yarn/cache/global
1212

1313
nodeLinker: pnpm
1414

1515
plugins:
1616
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
1717
spec: "https://mskelton.dev/yarn-outdated/v3"
1818

19-
yarnPath: .yarn/releases/yarn-4.6.0.cjs
19+
pnpmStoreFolder: ./.yarn/cache/.store
20+
21+
yarnPath: .yarn/releases/yarn-4.9.1.cjs

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mincho",
33
"type": "module",
44
"private": true,
5-
"packageManager": "yarn@4.6.0",
5+
"packageManager": "yarn@4.9.1",
66
"workspaces": [
77
"configs/*",
88
"packages/*",

0 commit comments

Comments
 (0)