fix(build): replace custom Deno compile scripts with tsdeno-based binary builds in CI and release workflows

This commit is contained in:
2026-03-15 15:41:37 +00:00
parent bcab4f274e
commit 19703de50d
10 changed files with 130 additions and 116 deletions

View File

@@ -1,60 +0,0 @@
#!/bin/bash
#
# Compile Onebox for all platforms
#
set -e
VERSION=$(grep '"version"' deno.json | cut -d'"' -f4)
echo "Compiling Onebox v${VERSION} for all platforms..."
# Install only transitively imported dependencies (skips devDependencies from package.json)
echo "Installing production dependencies..."
deno install --entrypoint mod.ts
# Create dist directory
mkdir -p dist/binaries
# Compile for each platform (--node-modules-dir=none avoids bundling local node_modules)
echo "Compiling for Linux x64..."
deno compile --allow-all --no-check --node-modules-dir=none \
--output "dist/binaries/onebox-linux-x64" \
--target x86_64-unknown-linux-gnu \
mod.ts
echo "Compiling for Linux ARM64..."
deno compile --allow-all --no-check --node-modules-dir=none \
--output "dist/binaries/onebox-linux-arm64" \
--target aarch64-unknown-linux-gnu \
mod.ts
echo "Compiling for macOS x64..."
deno compile --allow-all --no-check --node-modules-dir=none \
--output "dist/binaries/onebox-macos-x64" \
--target x86_64-apple-darwin \
mod.ts
echo "Compiling for macOS ARM64..."
deno compile --allow-all --no-check --node-modules-dir=none \
--output "dist/binaries/onebox-macos-arm64" \
--target aarch64-apple-darwin \
mod.ts
echo "Compiling for Windows x64..."
deno compile --allow-all --no-check --node-modules-dir=none \
--output "dist/binaries/onebox-windows-x64.exe" \
--target x86_64-pc-windows-msvc \
mod.ts
echo ""
echo "✓ Compilation complete!"
echo ""
echo "Binaries:"
ls -lh dist/binaries/
echo ""
echo "Next steps:"
echo "1. Test binaries on their respective platforms"
echo "2. Create git tag: git tag v${VERSION}"
echo "3. Push tag: git push origin v${VERSION}"
echo "4. Upload binaries to Gitea release"
echo "5. Publish to npm: pnpm publish"