Skip to content

Commit 6913937

Browse files
committed
fix: pack zeromq on the main CI
1 parent 7304969 commit 6913937

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/CI.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,17 @@ jobs:
162162
name: build-${{ strategy.job-index }}
163163
overwrite: true
164164

165-
- name: Upload lib
165+
- name: Pack Zeromq
166+
if: matrix.os == 'ubuntu-20.04'
167+
run: |
168+
pnpm pack
169+
170+
- name: Upload Pack
166171
if: matrix.os == 'ubuntu-20.04'
167172
uses: actions/upload-artifact@v4
168173
with:
169-
path: ./lib
170-
name: lib
174+
path: ./*.tgz
175+
name: pack
171176
overwrite: true
172177

173178
- name: Lint
@@ -228,11 +233,11 @@ jobs:
228233
name: build
229234
path: ./build
230235

231-
- name: Place lib
236+
- name: Place Pack
232237
uses: actions/download-artifact@v4
233238
with:
234-
name: lib
235-
path: ./lib
239+
name: pack
240+
path: ./
236241

237242
- name: Install Node
238243
uses: actions/setup-node@v4

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"lint": "run-p format lint.eslint format",
113113
"lint-test": "run-s lint-test.eslint",
114114
"bench": "node --expose-gc test/bench",
115+
"prepublishOnly": "pnpm run build.js",
115116
"bump": "pnpx npm-check-updates -u -x typescript,eslint,chai && pnpx typesync && pnpm update"
116117
},
117118
"cmake-ts": {

script/smoke-test.bash

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
set -ev
33
set -o pipefail
44

5-
echo "Pack zeromq.js"
5+
echo "Pack zeromq.js if needed"
66
version=$(npm pkg get version | tr -d '"')
77
pack_name="zeromq-${version}.tgz"
8-
rm -f "${pack_name}"
9-
npm pack
8+
test -f "${pack_name}" || npm pack
109

1110
init_smoke_test() {
1211
local pm=$1

0 commit comments

Comments
 (0)