Skip to content

Commit

Permalink
fix(ci/changesets): update cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Jul 30, 2024
1 parent 583fcc3 commit 839d8c7
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,27 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: latest
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@v2.2.2
id: pnpm-install
with:
version: latest
run_install: false

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- 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

- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: pnpm
node-version: latest
registry-url: 'https://registry.npmjs.org'

- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm install --frozen-lockfile

- name: Create and Publish Versions
uses: changesets/action@v1
- uses: changesets/action@v1
with:
version: pnpm changeset version
commit: 'chore: 🔖 update versions'
Expand Down

0 comments on commit 839d8c7

Please sign in to comment.