Skip to content

Commit 311ff93

Browse files
committed
💚 Fix node installation
1 parent e1ec57f commit 311ff93

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111

1212
jobs:
1313
build:
14+
if: github.event_name == 'pull_request'
1415
runs-on: ubuntu-latest
15-
container: alpine:latest
16+
strategy:
17+
matrix:
18+
node-version: [18, 20]
1619
steps:
1720
- uses: actions/checkout@v4
1821

@@ -33,7 +36,7 @@ jobs:
3336

3437
# build & test
3538
- name: Build
36-
run: npm run build # TODO: Change "build" to "test" when tests are ready
39+
run: pnpm run build # TODO: Change "build" to "test" when tests are ready
3740
env:
3841
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3942

@@ -42,6 +45,23 @@ jobs:
4245
runs-on: ubuntu-latest
4346
needs: build
4447
steps:
48+
- uses: actions/checkout@v4
49+
50+
# Install Pnpm & Node
51+
- name: Install Pnpm
52+
uses: pnpm/action-setup@v4
53+
with:
54+
version: 9
55+
- name: Install Node
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: 20
59+
cache: 'pnpm'
60+
61+
# Install dependencies with pnpm
62+
- name: Install Dependencies
63+
run: pnpm install
64+
4565
# setup git config (for auto-version bumping)
4666
- name: Setup git config
4767
run: |
@@ -50,6 +70,6 @@ jobs:
5070
5171
# deploy to npm
5272
- name: Deploy
53-
run: npm run deploy
73+
run: pnpm run deploy
5474
env:
5575
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)