Skip to content

Commit

Permalink
Fix prebuild upload on windows
Browse files Browse the repository at this point in the history
Prebuild upload needs a GitHub access token to upload artifacts to a
GitHub release. This token was provided via an environment variable,
which broke on windows due to a different env var access format string.

To only use one upload script command, the token is now passed in as
additional argument after "--". This way the upload works on all
operating systems.
  • Loading branch information
bertschneider committed Sep 15, 2022
1 parent 74fd382 commit 265c929
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ jobs:
- name: install dependencies
run: npm install --ws=@jazzer.js/fuzzer
- name: build and upload prebuilds
run: npm run upload --workspace=@jazzer.js/fuzzer
env:
GITHUB_TOKEN: ${{ github.token }}
run: >
npm run upload --workspace=@jazzer.js/fuzzer --
${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion packages/fuzzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"types": "dist/fuzzer.d.ts",
"scripts": {
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose",
"upload": "prebuild --runtime napi --backend cmake-js --all --strip --upload ${GITHUB_TOKEN}",
"upload": "prebuild --runtime napi --backend cmake-js --all --strip --upload",
"install": "prebuild-install --runtime napi || cmake-js rebuild --out build",
"build": "cmake-js compile --out build",
"format:fix": "clang-format -i *.cpp shared/*.cpp shared/*.h",
Expand Down

0 comments on commit 265c929

Please sign in to comment.