Skip to content

Commit b9afaf0

Browse files
committed
ci: install pnpm before publishing
1 parent 4ff6ddb commit b9afaf0

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/CI.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ jobs:
9090
with:
9191
name: minijson-${{ runner.os }}-${{ runner.arch }}
9292
path: ./dist
93+
retention-days: 1
9394

9495
Release:
96+
if: startsWith(github.ref, 'refs/tags/')
9597
runs-on: ubuntu-latest
9698
needs: build
9799
steps:
@@ -106,7 +108,7 @@ jobs:
106108
name: merged-artifacts
107109
path: dist/
108110

109-
- name: Prepare
111+
- name: Prepare Dist
110112
run: |
111113
chmod +x ./dist/*/minijson
112114
zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe
@@ -116,7 +118,6 @@ jobs:
116118
ls -l ./dist
117119
118120
- name: Draft the release
119-
if: startsWith(github.ref, 'refs/tags/')
120121
uses: meeDamian/[email protected]
121122
with:
122123
token: ${{ secrets.GITHUB_TOKEN }}
@@ -128,8 +129,20 @@ jobs:
128129
dist/minijson-macos-arm64.tar.gz
129130
dist/minijson-linux-x64.tar.gz
130131
132+
- name: Setup Node
133+
uses: actions/setup-node@v4
134+
with:
135+
node-version: ${{ matrix.node }}
136+
137+
- name: Setup Pnpm
138+
uses: pnpm/action-setup@v4
139+
with:
140+
version: ${{ matrix.pnpm }}
141+
142+
- name: Install dependencies
143+
run: pnpm install
144+
131145
- name: Publish to npm
132-
if: startsWith(github.ref, 'refs/tags/')
133146
run: pnpm publish
134147
env:
135148
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)