Skip to content

Commit

Permalink
gh: streamline npm cache
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed May 22, 2024
1 parent d1688fd commit fdd772d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,38 @@ jobs:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- name: Setup workflow
uses: ./.github/actions/setup
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: 9
run_install: false

- name: Install and build package
- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install package
run: |
pnpm --filter-prod ${{ matrix.package-name }}... install
- name: Build package
run: |
pnpm --filter ${{ matrix.package-name }}... build
- name: Publish package
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hop-protocol/sdk",
"version": "0.0.20",
"version": "0.0.21",
"description": "The v1 Hop Protocol TypeScript SDK",
"author": "Authereum Labs, Inc.",
"license": "MIT",
Expand Down

0 comments on commit fdd772d

Please sign in to comment.