92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
release:
|
|
name: Build & Publish Release
|
|
runs-on: ssh
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check toolchain versions
|
|
run: node --version && npm --version
|
|
|
|
- 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: node scripts/build-distributable.js --all --package
|
|
|
|
- name: Package extension (zip + xpi)
|
|
run: npm run pack
|
|
|
|
- name: Smoke test — run binary for current platform
|
|
run: |
|
|
PLAT=$(node -e "process.stdout.write(process.platform)")
|
|
ARCH=$(node -e "process.stdout.write(process.arch === 'arm64' ? 'arm64' : 'x64')")
|
|
HOST="${PLAT}-${ARCH}"
|
|
echo "Runner platform: $HOST"
|
|
|
|
BIN=""
|
|
for candidate in \
|
|
"releases/${HOST}/holesail-browser-host" \
|
|
"releases/${HOST}/holesail-browser-host.exe"; do
|
|
if [ -f "$candidate" ]; then
|
|
BIN="$candidate"
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [ -z "$BIN" ]; then
|
|
echo "No binary found for $HOST — skipping smoke test"
|
|
find releases/ -type f | sort
|
|
exit 0
|
|
fi
|
|
|
|
echo "Testing binary: $BIN"
|
|
chmod +x "$BIN"
|
|
OUTPUT=$(timeout 6 "$BIN" 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
|
|
|
|
- name: List release artifacts
|
|
run: |
|
|
echo "=== releases/ ==="
|
|
find releases/ -type f | sort
|
|
echo ""
|
|
find releases/ -type f -exec ls -lh {} \; | awk '{print $5, $9}'
|
|
|
|
- name: Generate checksums
|
|
run: |
|
|
cd releases
|
|
find . -name "*.zip" -o -name "*.xpi" | sort | xargs sha256sum > SHA256SUMS.txt
|
|
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
|