Skip to content

Commit e4d54fd

Browse files
authored
chore: upload npm pack to node addon release instead (#560)
It will contain addons for all platforms. No need to upload them too.
1 parent 3776f20 commit e4d54fd

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/build-router.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,6 @@ jobs:
151151
file: target/${{ matrix.rust_target }}/release/${{ env.BINARY_NAME }}
152152
asset_name: hive_router_${{ matrix.name }}
153153
tag: ${{ github.ref }}
154-
- name: Upload node addons to release
155-
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
156-
if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'node-addon/v')
157-
with:
158-
repo_token: ${{ secrets.GITHUB_TOKEN }}
159-
file_glob: true
160-
file: lib/node-addon/*.node
161-
tag: ${{ github.ref }}
162154

163155
# NOTE: would publish from release.yaml but we need the artifacts. doing it from here is simpler
164156
npm-publish:
@@ -187,11 +179,21 @@ jobs:
187179
mv ./node_addon_linux_amd64/* .
188180
mv ./node_addon_macos_arm64/* .
189181
mv ./node_addon_macos_amd64/* .
190-
- name: npm publish
182+
- name: publish
191183
working-directory: lib/node-addon
192184
env:
193185
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
194186
run: npm publish --provenance
187+
- name: pack
188+
working-directory: lib/node-addon
189+
run: npm pack
190+
- name: upload pack to release
191+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
192+
with:
193+
repo_token: ${{ secrets.GITHUB_TOKEN }}
194+
file_glob: true
195+
file: lib/node-addon/*.tgz
196+
tag: ${{ github.ref }}
195197

196198
docker:
197199
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)