-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from codeforjapan/chore/use-pnpm
migrate into pnpm
- Loading branch information
Showing
8 changed files
with
11,255 additions
and
9,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
name: Setup Node.js | ||
description: Setup Node.js and yarn | ||
description: Setup Node.js and pnpm | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup yarn | ||
shell: bash | ||
run: corepack enable yarn | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
with: | ||
run_install: false | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-store | ||
- name: Get pnpm store path | ||
id: pnpm-store | ||
shell: bash | ||
run: echo "store_path=$(yarn cache dir)" >> "$GITHUB_OUTPUT" | ||
run: echo "store_path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version-file: package.json | ||
|
||
- name: Restore yarn cache | ||
- name: Restore pnpm cache | ||
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: ${{ steps.yarn-store.outputs.store_path }} | ||
key: ${{ runner.os }}-yarn-store-${{ hashFiles('**/yarn.lock') }} | ||
path: ${{ steps.pnpm-store.outputs.store_path }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-store- | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install Dependencies | ||
shell: bash | ||
run: yarn install --frozen-lockfile | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Save pnpm cache if main branch | ||
if: github.ref_name == 'main' | ||
id: save-yarn-cache | ||
id: save-pnpm-cache | ||
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: ${{ steps.yarn-store.outputs.store_path }} | ||
key: ${{ runner.os }}-yarn-store-${{ hashFiles('**/yarn.lock') }} | ||
path: ${{ steps.pnpm-store.outputs.store_path }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-prefix='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.