Skip to content

Commit

Permalink
Merge pull request #23 from oven-sh/debug-build-ci
Browse files Browse the repository at this point in the history
publish JSC debug builds to NPM
  • Loading branch information
paperdave authored Oct 21, 2023
2 parents 1a49a1f + 5a0f349 commit 20c203d
Showing 1 changed file with 23 additions and 47 deletions.
70 changes: 23 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,60 +268,36 @@ jobs:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: |
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-linux-amd64-lto.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-linux-arm64-lto.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-macos-arm64-lto.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-macos-amd64-lto.tar.gz
cd bun-webkit
npm publish --tag next --access=public
TO_PUBLISH=(
"bun-webkit-linux-amd64-debug.tar.gz"
"bun-webkit-linux-arm64-debug.tar.gz"
"bun-webkit-macos-arm64-debug.tar.gz"
"bun-webkit-macos-amd64-debug.tar.gz"
"bun-webkit-linux-amd64.tar.gz"
"bun-webkit-linux-arm64.tar.gz"
"bun-webkit-macos-arm64.tar.gz"
"bun-webkit-macos-amd64.tar.gz"
"bun-webkit-linux-amd64-lto.tar.gz"
"bun-webkit-linux-arm64-lto.tar.gz"
"bun-webkit-macos-arm64-lto.tar.gz"
"bun-webkit-macos-amd64-lto.tar.gz"
)
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-linux-amd64.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-linux-arm64.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-macos-arm64.tar.gz
cd bun-webkit
npm publish --tag next --access=public
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf bun-webkit-macos-amd64.tar.gz
cd bun-webkit
npm publish --tag next --access=public
for FILE in "${TO_PUBLISH[@]}"
do
rm -rf ${{runner.temp}}/bun-webkit
cd ${{runner.temp}}
tar -xzf $FILE
cd bun-webkit
npm publish --tag next --access=public
done
rm -rf ${{runner.temp}}/bun-webkit-lto ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit-debug
mkdir -p ${{runner.temp}}/bun-webkit-lto ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit-debug
echo '{ "name": "bun-webkit", "version": "0.0.1-${{github.sha}}", "repository": "https://github.com/${{github.repository}}", "optionalDependencies": {"bun-webkit-linux-amd64": "0.0.1-${{github.sha}}", "bun-webkit-linux-arm64": "0.0.1-${{github.sha}}", "bun-webkit-macos-arm64": "0.0.1-${{github.sha}}", "bun-webkit-macos-amd64": "0.0.1-${{github.sha}}"} }' > ${{runner.temp}}/bun-webkit/package.json
echo '{ "name": "bun-webkit-lto", "version": "0.0.1-${{github.sha}}", "repository": "https://github.com/${{github.repository}}", "optionalDependencies": {"bun-webkit-linux-amd64-lto": "0.0.1-${{github.sha}}", "bun-webkit-linux-arm64-lto": "0.0.1-${{github.sha}}", "bun-webkit-macos-arm64-lto": "0.0.1-${{github.sha}}", "bun-webkit-macos-amd64-lto": "0.0.1-${{github.sha}}"} }' > ${{runner.temp}}/bun-webkit-lto/package.json
echo '{ "name": "bun-webkit-debug", "version": "0.0.1-${{github.sha}}", "repository": "https://github.com/${{github.repository}}", "config": {"bun-webkit-linux-amd64-debug": "${{ fromJSON(steps.release.outputs.assets)[0].browser_download_url }}", "bun-webkit-linux-arm64-debug": "${{ fromJSON(steps.release.outputs.assets)[1].browser_download_url }}", "bun-webkit-macos-arm64-debug": "${{ fromJSON(steps.release.outputs.assets)[2].browser_download_url }}", "bun-webkit-macos-amd64-debug": "${{ fromJSON(steps.release.outputs.assets)[3].browser_download_url }}"} }' > ${{runner.temp}}/bun-webkit-debug/package.json
echo '{ "name": "bun-webkit-debug", "version": "0.0.1-${{github.sha}}", "repository": "https://github.com/${{github.repository}}", "optionalDependencies": {"bun-webkit-linux-amd64-debug": "0.0.1-${{github.sha}}", "bun-webkit-linux-arm64-debug": "0.0.1-${{github.sha}}", "bun-webkit-macos-arm64-debug": "0.0.1-${{github.sha}}", "bun-webkit-macos-amd64-debug": "0.0.1-${{github.sha}}"} }' > ${{runner.temp}}/bun-webkit-debug/package.json
echo "$README_TEXT" > ${{runner.temp}}/bun-webkit/README.md
echo "$README_TEXT" > ${{runner.temp}}/bun-webkit-lto/README.md
Expand Down

0 comments on commit 20c203d

Please sign in to comment.