Skip to content

Commit

Permalink
refactor(workflows): add pnpm/action-setup@v2 and node-versions to GH…
Browse files Browse the repository at this point in the history
… workflows
  • Loading branch information
f3rno64 committed Feb 7, 2024
1 parent df1a41d commit 3e167fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Install pnpm
run: npm i -g pnpm
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js 20
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Install pnpm
run: npm i -g pnpm

- uses: actions/setup-node@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm i
Expand Down

0 comments on commit 3e167fc

Please sign in to comment.