Skip to content

Commit

Permalink
chore: Migrate package manager from pnpm to yarn
Browse files Browse the repository at this point in the history
technote-space/release-github-actions dosen't support pnpm
  • Loading branch information
kamiazya committed Jun 26, 2024
1 parent 9403d68 commit 6a10811
Show file tree
Hide file tree
Showing 5 changed files with 1,799 additions and 2,229 deletions.
22 changes: 10 additions & 12 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name: Setup Action
description: |
Setup Node.js and pnpm.
Setup Node.js and yarn.
runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: ./.node-version
cache: pnpm
- name: Get pnpm store directory
cache: yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
name: Setup pnpm cache
name: Setup yarn cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: pnpm install --frozen-lockfile
run: yarn install --frozen-lockfile
shell: bash
10 changes: 5 additions & 5 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
- name: Lint
run: pnpm lint
run: yarn lint
- name: TypeCheck
run: pnpm typecheck
run: yarn typecheck

unit-test:
name: Unit Tests
Expand All @@ -24,9 +24,9 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
- name: Test
run: pnpm test
run: yarn test
- name: Build
run: pnpm build
run: yarn build

build:
name: Build
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: pnpm build
run: yarn build
- name: Upload Artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
"typescript": "^5.4.5",
"vitest": "^1.5.0"
},
"packageManager": "[email protected]+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631"
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading

0 comments on commit 6a10811

Please sign in to comment.