Skip to content

Commit

Permalink
Merge pull request #533 from jviide/update-actions
Browse files Browse the repository at this point in the history
build(actions): update actions, use actions/setup-node's builtin caching
  • Loading branch information
marvinhagemeister authored Mar 18, 2024
2 parents d17ed0d + dcb3c4b commit 64a09bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: compressed-size

on:
pull_request:
branches:
Expand All @@ -8,13 +9,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: compressed-size-action
uses: preactjs/compressed-size-action@v2
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node.js
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node.js
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install
Expand Down

0 comments on commit 64a09bb

Please sign in to comment.