Skip to content

Commit

Permalink
Bump GH Actions versions for checkout, pnpm, & node, and use node 20
Browse files Browse the repository at this point in the history
Also
- clean up and utilize the matrix `node-version`
- Use node caching for pnpm dependencies, as is shown in
  https://github.com/pnpm/action-setup/blob/ac5bf11548bf5e19b8aadb8182072616590fa4a6/README.md#use-cache-to-reduce-installation-time
- Rely on the `packageManager` in package.json for the pnpm version, as
  required by the newer pnpm setup action
  (https://github.com/pnpm/action-setup/blob/ac5bf11548bf5e19b8aadb8182072616590fa4a6/README.md#install-only-pnpm-with-packagemanager)
  • Loading branch information
sjdemartini committed Dec 28, 2024
1 parent fd1f90b commit 056249f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
node-version: [20]

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
version: 9
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install pnpm
uses: pnpm/action-setup@v4

- run: pnpm install

Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,22 @@ jobs:
permissions:
contents: read
id-token: write # Needed for https://docs.npmjs.com/generating-provenance-statements
strategy:
matrix:
node-version: [18]

needs: [build-test] # Require standard CI steps to pass before publishing

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

# Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN
# to work below.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install pnpm
uses: pnpm/action-setup@v4

- run: pnpm install

Expand Down

0 comments on commit 056249f

Please sign in to comment.