fix(build): replace custom Deno compile scripts with tsdeno-based binary builds in CI and release workflows
This commit is contained in:
@@ -22,6 +22,9 @@ jobs:
|
||||
with:
|
||||
deno-version: v2.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: deno install --entrypoint mod.ts
|
||||
|
||||
- name: Check TypeScript types
|
||||
run: deno check mod.ts
|
||||
|
||||
@@ -46,10 +49,18 @@ jobs:
|
||||
with:
|
||||
deno-version: v2.x
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Compile for current platform
|
||||
run: |
|
||||
echo "Testing compilation for Linux x86_64..."
|
||||
deno compile --allow-all --no-check \
|
||||
npx tsdeno compile --allow-all --no-check \
|
||||
--output onebox-test \
|
||||
--target x86_64-unknown-linux-gnu mod.ts
|
||||
|
||||
@@ -72,8 +83,16 @@ jobs:
|
||||
with:
|
||||
deno-version: v2.x
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Compile all platform binaries
|
||||
run: bash scripts/compile-all.sh
|
||||
run: mkdir -p dist/binaries && npx tsdeno compile
|
||||
|
||||
- name: Upload all binaries as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
@@ -20,6 +20,14 @@ jobs:
|
||||
with:
|
||||
deno-version: v2.x
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Get version from tag
|
||||
id: version
|
||||
run: |
|
||||
@@ -41,57 +49,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Compile binaries for all platforms
|
||||
run: |
|
||||
echo "================================================"
|
||||
echo " Onebox Release Compilation"
|
||||
echo " Version: ${{ steps.version.outputs.version }}"
|
||||
echo "================================================"
|
||||
echo ""
|
||||
|
||||
# Clean up old binaries and create fresh directory
|
||||
rm -rf dist/binaries
|
||||
mkdir -p dist/binaries
|
||||
echo "-> Cleaned old binaries from dist/binaries"
|
||||
echo ""
|
||||
|
||||
# Linux x86_64
|
||||
echo "-> Compiling for Linux x86_64..."
|
||||
deno compile --allow-all --no-check \
|
||||
--output dist/binaries/onebox-linux-x64 \
|
||||
--target x86_64-unknown-linux-gnu mod.ts
|
||||
echo " Done: Linux x86_64"
|
||||
|
||||
# Linux ARM64
|
||||
echo "-> Compiling for Linux ARM64..."
|
||||
deno compile --allow-all --no-check \
|
||||
--output dist/binaries/onebox-linux-arm64 \
|
||||
--target aarch64-unknown-linux-gnu mod.ts
|
||||
echo " Done: Linux ARM64"
|
||||
|
||||
# macOS x86_64
|
||||
echo "-> Compiling for macOS x86_64..."
|
||||
deno compile --allow-all --no-check \
|
||||
--output dist/binaries/onebox-macos-x64 \
|
||||
--target x86_64-apple-darwin mod.ts
|
||||
echo " Done: macOS x86_64"
|
||||
|
||||
# macOS ARM64
|
||||
echo "-> Compiling for macOS ARM64..."
|
||||
deno compile --allow-all --no-check \
|
||||
--output dist/binaries/onebox-macos-arm64 \
|
||||
--target aarch64-apple-darwin mod.ts
|
||||
echo " Done: macOS ARM64"
|
||||
|
||||
# Windows x86_64
|
||||
echo "-> Compiling for Windows x86_64..."
|
||||
deno compile --allow-all --no-check \
|
||||
--output dist/binaries/onebox-windows-x64.exe \
|
||||
--target x86_64-pc-windows-msvc mod.ts
|
||||
echo " Done: Windows x86_64"
|
||||
|
||||
echo ""
|
||||
echo "All binaries compiled successfully!"
|
||||
ls -lh dist/binaries/
|
||||
run: mkdir -p dist/binaries && npx tsdeno compile
|
||||
|
||||
- name: Generate SHA256 checksums
|
||||
run: |
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-03-15 - 1.13.3 - fix(build)
|
||||
replace custom Deno compile scripts with tsdeno-based binary builds in CI and release workflows
|
||||
|
||||
- adds @git.zone/tsdeno as a dev dependency and configures compile targets in npmextra.json
|
||||
- updates CI and release workflows to install Node.js dependencies before running tsdeno compile
|
||||
- removes the legacy scripts/compile-all.sh script and points the compile task to tsdeno compile
|
||||
|
||||
## 2026-03-15 - 1.13.2 - fix(scripts)
|
||||
install production dependencies before compiling binaries and exclude local node_modules from builds
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"tasks": {
|
||||
"test": "deno test --allow-all test/",
|
||||
"test:watch": "deno test --allow-all --watch test/",
|
||||
"compile": "bash scripts/compile-all.sh",
|
||||
"compile": "tsdeno compile",
|
||||
"dev": "pnpm run watch"
|
||||
},
|
||||
"imports": {
|
||||
|
||||
@@ -11,6 +11,26 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"@git.zone/tsdeno": {
|
||||
"compileTargets": [
|
||||
{
|
||||
"name": "onebox-linux-x64",
|
||||
"entryPoint": "mod.ts",
|
||||
"outDir": "dist/binaries",
|
||||
"target": "x86_64-unknown-linux-gnu",
|
||||
"permissions": ["--allow-all"],
|
||||
"noCheck": true
|
||||
},
|
||||
{
|
||||
"name": "onebox-linux-arm64",
|
||||
"entryPoint": "mod.ts",
|
||||
"outDir": "dist/binaries",
|
||||
"target": "aarch64-unknown-linux-gnu",
|
||||
"permissions": ["--allow-all"],
|
||||
"noCheck": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"@git.zone/tswatch": {
|
||||
"bundles": [
|
||||
{
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbundle": "^2.9.0",
|
||||
"@git.zone/tsdeno": "^1.1.1",
|
||||
"@git.zone/tswatch": "^3.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
69
pnpm-lock.yaml
generated
69
pnpm-lock.yaml
generated
@@ -24,6 +24,9 @@ importers:
|
||||
'@git.zone/tsbundle':
|
||||
specifier: ^2.9.0
|
||||
version: 2.9.0
|
||||
'@git.zone/tsdeno':
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1
|
||||
'@git.zone/tswatch':
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0(@tiptap/pm@2.27.2)
|
||||
@@ -270,6 +273,10 @@ packages:
|
||||
resolution: {integrity: sha512-itXX/oiJjrRHUlIGTHUEqSwPuGwsG4Cq8kh7aqFOm8mYzJwtXYE1gBqLJTWZma6gI5n+xAk5qTxTyfikuPgWQA==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tsdeno@1.1.1':
|
||||
resolution: {integrity: sha512-+ECRtHZFyG1U50lb2sJsy51940sFBUnmM7aEKcRPplz9uLm6i6uSVZJFgdGGVtzRvW646GvBvRpWzYPyXcMclw==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tsrun@2.0.1':
|
||||
resolution: {integrity: sha512-NEcnsjvlC1o3Z6SS3VhKCf6Ev+Sh4EAinmggslrIR/ppMrvjDbXNFXoyr3PB+GLeSAR0JRZ1fGvVYjpEzjBdIg==}
|
||||
hasBin: true
|
||||
@@ -500,6 +507,9 @@ packages:
|
||||
'@push.rocks/smartexit@1.1.0':
|
||||
resolution: {integrity: sha512-GD8VLIbxQuwvhPXwK4eH162XAYSj+M3wGKWGNO3i1iY4bj8P3BARcgsWx6/ntN3aCo5ygWtrevrfD5iecYY2Ng==}
|
||||
|
||||
'@push.rocks/smartexit@2.0.3':
|
||||
resolution: {integrity: sha512-ZWpZ3Elorpv/rKtUcCUejUHG4BIE5B3QWysBAgb7lTcA7y0vGdFY32Y5/Q5tHpZM6PPxl/WTdUOYtSojQTq+pA==}
|
||||
|
||||
'@push.rocks/smartfeed@1.4.0':
|
||||
resolution: {integrity: sha512-bvj/3cGQI6TbbjbqrgC1uufcqprd/VthefuIsS8KHiHyCqYD5Z6RTjrbQY9WOCsmub/dcuMavfXQZqe9g2+OrQ==}
|
||||
|
||||
@@ -515,6 +525,9 @@ packages:
|
||||
'@push.rocks/smartfs@1.3.1':
|
||||
resolution: {integrity: sha512-ZSduVS8tM+/erbyCTvRRvc9gLWwbpqN5xdIIkMr+gub7fowSeJb7tR2rnGwySa63DyimU0q2KTp79VV9YqGLeg==}
|
||||
|
||||
'@push.rocks/smartfs@1.5.0':
|
||||
resolution: {integrity: sha512-QwMD44HgX3d9PPxUwR0uS+0PEMtesKvKbZR+s4pezL2er6oPneKJMLkO6TJPvJ38nug6Lmlk9Bu7UrwR2kS3Vw==}
|
||||
|
||||
'@push.rocks/smartguard@3.1.0':
|
||||
resolution: {integrity: sha512-J23q84f1O+TwFGmd4lrO9XLHUh2DaLXo9PN/9VmTWYzTkQDv5JehmifXVI0esophXcCIfbdIu6hbt7/aHlDF4A==}
|
||||
|
||||
@@ -584,6 +597,9 @@ packages:
|
||||
'@push.rocks/smartrouter@1.3.3':
|
||||
resolution: {integrity: sha512-1+xZEnWlhzqLWAaJ1zFNhQ0zgbfCWQl1DBT72LygLxTs+P0K8AwJKgqo/IX6CT55kGCFnPAZIYSbVJlGsgrB0w==}
|
||||
|
||||
'@push.rocks/smartrust@1.3.2':
|
||||
resolution: {integrity: sha512-HPzSJgDnKUdE5fkn2+BC9JvFXk7wl6aURAiHAXjHSCBLtzfgB7jEXjlg+K6CEfMjwQV7sy+hYABlq5DLXcFseQ==}
|
||||
|
||||
'@push.rocks/smartrx@3.0.10':
|
||||
resolution: {integrity: sha512-USjIYcsSfzn14cwOsxgq/bBmWDTTzy3ouWAnW5NdMyRRzEbmeNrvmy6TRqNeDlJ2PsYNTt1rr/zGUqvIy72ITg==}
|
||||
|
||||
@@ -593,6 +609,9 @@ packages:
|
||||
'@push.rocks/smartshell@3.3.0':
|
||||
resolution: {integrity: sha512-m0w618H6YBs+vXGz1CgS4nPi5CUAnqRtckcS9/koGwfcIx1IpjqmiP47BoCTbdgcv0IPUxQVBG1IXTHPuZ8Z5g==}
|
||||
|
||||
'@push.rocks/smartshell@3.3.7':
|
||||
resolution: {integrity: sha512-b3st2+FjHUVhZZRlXfw93+SQA0UMVlURqe55uVpWdjJX7jeGXTTeszuYygtiR99zC5iZ8WZhGDct3N2L1qc/qw==}
|
||||
|
||||
'@push.rocks/smartsitemap@2.0.4':
|
||||
resolution: {integrity: sha512-76dYWG/o/EjV4vYCK7ZKM35T9xgrI+oHEiiIE6E2MDaFIU6QnSfciTfbscH5nc0vxx8Ah+I0HPEJO94BM2S39w==}
|
||||
|
||||
@@ -1565,6 +1584,10 @@ packages:
|
||||
resolution: {integrity: sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
isexe@4.0.0:
|
||||
resolution: {integrity: sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==}
|
||||
engines: {node: '>=20'}
|
||||
|
||||
jackspeak@4.2.3:
|
||||
resolution: {integrity: sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==}
|
||||
engines: {node: 20 || >=22}
|
||||
@@ -2276,6 +2299,11 @@ packages:
|
||||
engines: {node: ^18.17.0 || >=20.5.0}
|
||||
hasBin: true
|
||||
|
||||
which@6.0.1:
|
||||
resolution: {integrity: sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==}
|
||||
engines: {node: ^20.17.0 || >=22.9.0}
|
||||
hasBin: true
|
||||
|
||||
wrap-ansi@6.2.0:
|
||||
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -2652,6 +2680,19 @@ snapshots:
|
||||
- supports-color
|
||||
- vue
|
||||
|
||||
'@git.zone/tsdeno@1.1.1':
|
||||
dependencies:
|
||||
'@push.rocks/early': 4.0.4
|
||||
'@push.rocks/npmextra': 5.3.3
|
||||
'@push.rocks/smartcli': 4.0.20
|
||||
'@push.rocks/smartfs': 1.5.0
|
||||
'@push.rocks/smartshell': 3.3.7
|
||||
transitivePeerDependencies:
|
||||
- '@nuxt/kit'
|
||||
- react
|
||||
- supports-color
|
||||
- vue
|
||||
|
||||
'@git.zone/tsrun@2.0.1':
|
||||
dependencies:
|
||||
'@push.rocks/smartfile': 13.1.2
|
||||
@@ -3001,6 +3042,11 @@ snapshots:
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
tree-kill: 1.2.2
|
||||
|
||||
'@push.rocks/smartexit@2.0.3':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.3.1
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
|
||||
'@push.rocks/smartfeed@1.4.0':
|
||||
dependencies:
|
||||
'@tsclass/tsclass': 9.3.0
|
||||
@@ -3047,6 +3093,11 @@ snapshots:
|
||||
dependencies:
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
|
||||
'@push.rocks/smartfs@1.5.0':
|
||||
dependencies:
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
'@push.rocks/smartrust': 1.3.2
|
||||
|
||||
'@push.rocks/smartguard@3.1.0':
|
||||
dependencies:
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
@@ -3194,6 +3245,10 @@ snapshots:
|
||||
'@push.rocks/smartrx': 3.0.10
|
||||
path-to-regexp: 8.3.0
|
||||
|
||||
'@push.rocks/smartrust@1.3.2':
|
||||
dependencies:
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
|
||||
'@push.rocks/smartrx@3.0.10':
|
||||
dependencies:
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
@@ -3221,6 +3276,14 @@ snapshots:
|
||||
tree-kill: 1.2.2
|
||||
which: 5.0.0
|
||||
|
||||
'@push.rocks/smartshell@3.3.7':
|
||||
dependencies:
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartexit': 2.0.3
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@types/which': 3.0.4
|
||||
which: 6.0.1
|
||||
|
||||
'@push.rocks/smartsitemap@2.0.4':
|
||||
dependencies:
|
||||
'@push.rocks/smartcache': 1.0.18
|
||||
@@ -4281,6 +4344,8 @@ snapshots:
|
||||
|
||||
isexe@3.1.5: {}
|
||||
|
||||
isexe@4.0.0: {}
|
||||
|
||||
jackspeak@4.2.3:
|
||||
dependencies:
|
||||
'@isaacs/cliui': 9.0.0
|
||||
@@ -5247,6 +5312,10 @@ snapshots:
|
||||
dependencies:
|
||||
isexe: 3.1.5
|
||||
|
||||
which@6.0.1:
|
||||
dependencies:
|
||||
isexe: 4.0.0
|
||||
|
||||
wrap-ansi@6.2.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
|
||||
@@ -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"
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/onebox',
|
||||
version: '1.13.2',
|
||||
version: '1.13.3',
|
||||
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/onebox',
|
||||
version: '1.13.2',
|
||||
version: '1.13.3',
|
||||
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user