115 lines
3.9 KiB
YAML
115 lines
3.9 KiB
YAML
# Flying Jib rolling release — Bare CLI standalones + Electron desktop package for the runner.
|
|
# Primary product is Electron desktop GUI (ADR-0014); CLI artifacts are secondary.
|
|
#
|
|
# Secrets:
|
|
# RELEASE_TOKEN — Gitea PAT with repo release write (required)
|
|
# GITEA_URL — optional forge base URL
|
|
#
|
|
# Env:
|
|
# FJ_MAKE_CLIENT — default 1; set 0 to skip electron-forge make
|
|
# Hosts: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64
|
|
name: Release rolling
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
inputs:
|
|
hosts:
|
|
description: 'Comma-separated 64-bit hosts for CLI standalones'
|
|
required: false
|
|
default: 'linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64'
|
|
|
|
concurrency:
|
|
group: release-rolling
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
DEFAULT_HOSTS: linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64
|
|
NODE_OPTIONS: '--dns-result-order=ipv4first'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 22
|
|
uses: actions/setup-node@v4
|
|
timeout-minutes: 5
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install system deps
|
|
timeout-minutes: 8
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
run: |
|
|
set -euo pipefail
|
|
APT_OPTS=(
|
|
-o Acquire::ForceIPv4=true
|
|
-o Acquire::Retries=3
|
|
-o Acquire::http::Timeout=30
|
|
-o Acquire::https::Timeout=30
|
|
)
|
|
sudo apt-get update -qq "${APT_OPTS[@]}" || true
|
|
sudo apt-get install -y -qq "${APT_OPTS[@]}" \
|
|
ca-certificates \
|
|
zip \
|
|
unzip \
|
|
libnss3 \
|
|
libatk-bridge2.0-0 \
|
|
libgtk-3-0 \
|
|
libgbm1 \
|
|
libasound2
|
|
|
|
- name: Install dependencies
|
|
timeout-minutes: 20
|
|
env:
|
|
NODE_OPTIONS: '--dns-result-order=ipv4first'
|
|
GIT_TERMINAL_PROMPT: '0'
|
|
npm_config_fetch_retries: '3'
|
|
npm_config_fetch_retry_mintimeout: '10000'
|
|
npm_config_fetch_retry_maxtimeout: '60000'
|
|
npm_config_fetch_timeout: '120000'
|
|
npm_config_fund: 'false'
|
|
npm_config_audit: 'false'
|
|
run: |
|
|
set -euo pipefail
|
|
git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"
|
|
git config --global url."https://github.com/".insteadOf "[email protected]:"
|
|
git config --global url."https://github.com/".insteadOf "ssh://[email protected]:"
|
|
npm ci --no-audit --no-fund --loglevel=info
|
|
node -e "console.log('node', process.version)"
|
|
|
|
- name: Build CLI hosts + publish rolling release
|
|
env:
|
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
GITEA_URL: ${{ secrets.GITEA_URL }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_SERVER_URL: ${{ github.server_url }}
|
|
GITHUB_SHA: ${{ github.sha }}
|
|
GITEA_SHA: ${{ github.sha }}
|
|
NODE_OPTIONS: '--dns-result-order=ipv4first'
|
|
FJ_CLI_HOSTS: ${{ github.event.inputs.hosts || 'linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64' }}
|
|
FJ_MAKE_CLIENT: '1'
|
|
RELEASE_TAG: rolling
|
|
CI: 'true'
|
|
run: |
|
|
set -euo pipefail
|
|
if [ -z "${RELEASE_TOKEN:-}" ]; then
|
|
echo "ERROR: secret RELEASE_TOKEN is not set"
|
|
exit 1
|
|
fi
|
|
if [ -n "${GITHUB_REPOSITORY:-}" ]; then
|
|
export GITEA_OWNER="${GITHUB_REPOSITORY%%/*}"
|
|
export GITEA_REPO="${GITHUB_REPOSITORY#*/}"
|
|
fi
|
|
if [ -z "${GITEA_URL:-}" ]; then
|
|
export GITEA_URL="${GITHUB_SERVER_URL:-}"
|
|
fi
|
|
echo "CLI hosts: $FJ_CLI_HOSTS"
|
|
chmod +x scripts/gitea-rolling-release.sh
|
|
bash scripts/gitea-rolling-release.sh
|