Skip to content

Commit

Permalink
fix(release-npm.yaml): update pnpm installation and caching process
Browse files Browse the repository at this point in the history
feat(release-npm.yaml): add support for pnpm store caching

The changes in this commit update the pnpm installation and caching process in the release-npm.yaml workflow. Instead of using the "pnpm install" command, the workflow now uses the "pnpm/action-setup" action to install pnpm. Additionally, the workflow now includes steps to get the pnpm store directory and set up caching for the pnpm store. This will improve the efficiency of the workflow by reusing the cached pnpm store between runs.
  • Loading branch information
chronark committed Jul 21, 2023
1 parent cf50225 commit 8b13977
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,29 @@ jobs:
with:
node-version: lts/*

- name: Install dependencies
run: pnpm install
- uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install -r

- name: Build package
run: pnpm build
Expand Down

1 comment on commit 8b13977

@vercel
Copy link

@vercel vercel bot commented on 8b13977 Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

unkey – ./

unkey-unkey.vercel.app
unkey.dev
unkey-git-main-unkey.vercel.app
unkey.vercel.app
www.unkey.dev

Please sign in to comment.