@@ -0,0 +1,93 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: Build & Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install root dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Install native-host dependencies
|
||||
run: npm install
|
||||
working-directory: native-host
|
||||
|
||||
- name: Lint — syntax check extension
|
||||
run: |
|
||||
node --check extension/background.js
|
||||
node --check extension/dashboard.js
|
||||
|
||||
- name: Lint — syntax check native host
|
||||
run: |
|
||||
node --check native-host/host.js
|
||||
node --check native-host/holesail-manager.js
|
||||
node --check native-host/ssh-manager.js
|
||||
node --check native-host/rdp-manager.js
|
||||
node --check native-host/backup-manager.js
|
||||
node --check native-host/certificate-authority.js
|
||||
node --check native-host/https-proxy.js
|
||||
node --check native-host/connect-proxy.js
|
||||
node --check native-host/messenger.js
|
||||
|
||||
- name: Lint — syntax check build scripts
|
||||
run: |
|
||||
node --check scripts/build-distributable.js
|
||||
node --check scripts/pack-extension.js
|
||||
node --check scripts/build-host.js
|
||||
|
||||
- name: Pack extension
|
||||
run: npm run pack
|
||||
|
||||
- name: Build host binary (current platform)
|
||||
run: npm run build:dist
|
||||
|
||||
- name: Smoke test — binary starts cleanly
|
||||
run: |
|
||||
OUTPUT=$(timeout 4 ./releases/holesail-browser-host 2>&1 || true)
|
||||
echo "$OUTPUT"
|
||||
if echo "$OUTPUT" | grep -q "\[holesail-browser-host\] ready"; then
|
||||
echo "PASS: binary started successfully"
|
||||
else
|
||||
echo "FAIL: binary did not print ready signal"
|
||||
exit 1
|
||||
fi
|
||||
if echo "$OUTPUT" | grep -qi "not available"; then
|
||||
echo "FAIL: one or more modules reported unavailable:"
|
||||
echo "$OUTPUT" | grep -i "not available"
|
||||
exit 1
|
||||
fi
|
||||
echo "PASS: no unavailable modules"
|
||||
|
||||
- name: Upload CI binary artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: holesail-browser-host-linux-x64
|
||||
path: releases/holesail-browser-host
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload extension artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: extension
|
||||
path: |
|
||||
releases/Holesail-Browser-*.zip
|
||||
releases/Holesail-Browser-*.xpi
|
||||
retention-days: 7
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & Publish Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install root dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Install native-host dependencies
|
||||
run: npm install
|
||||
working-directory: native-host
|
||||
|
||||
- name: Build all platform binaries
|
||||
run: npm run build:dist:all
|
||||
|
||||
- name: Package extension (zip + xpi)
|
||||
run: npm run pack
|
||||
|
||||
- name: Create zip archives for all binaries
|
||||
run: node scripts/build-distributable.js --all --package
|
||||
|
||||
- name: Smoke test — Linux x64 binary
|
||||
run: |
|
||||
OUTPUT=$(timeout 4 ./releases/x86_64/holesail-browser-host 2>&1 || true)
|
||||
echo "$OUTPUT"
|
||||
if echo "$OUTPUT" | grep -q "\[holesail-browser-host\] ready"; then
|
||||
echo "PASS: binary started successfully"
|
||||
else
|
||||
echo "FAIL: binary did not print ready signal"
|
||||
exit 1
|
||||
fi
|
||||
if echo "$OUTPUT" | grep -qi "not available"; then
|
||||
echo "FAIL: one or more modules reported unavailable"
|
||||
echo "$OUTPUT" | grep -i "not available"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: List release artifacts
|
||||
run: |
|
||||
echo "=== releases/ ==="
|
||||
ls -lh releases/*.zip releases/*.xpi 2>/dev/null || true
|
||||
echo "=== releases/x86_64/ ==="
|
||||
ls -lh releases/x86_64/ 2>/dev/null || true
|
||||
echo "=== releases/aarch64/ ==="
|
||||
ls -lh releases/aarch64/ 2>/dev/null || true
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd releases
|
||||
sha256sum *.zip *.xpi 2>/dev/null > SHA256SUMS.txt || true
|
||||
cat SHA256SUMS.txt
|
||||
|
||||
- name: Publish release
|
||||
uses: gitea.com/actions/gitea-release-action@latest
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
tag_name: ${{ gitea.ref_name }}
|
||||
name: Holesail Browser ${{ gitea.ref_name }}
|
||||
files: |-
|
||||
releases/*.zip
|
||||
releases/*.xpi
|
||||
releases/SHA256SUMS.txt
|
||||
sha256sum: false
|
||||
Reference in New Issue
Block a user