# Versioned GitHub Release — same host matrix as Gitea rolling (Linux servers + all client arches). name: Release on: push: tags: ['v*'] workflow_dispatch: inputs: skip_client: description: 'Skip Electron client builds (server only)' required: false default: 'false' dry_run: description: 'Build artifacts without uploading' required: false default: 'false' permissions: contents: write concurrency: group: release-${{ github.ref }} cancel-in-progress: true env: NODE_OPTIONS: '--dns-result-order=ipv4first' jobs: release: runs-on: ubuntu-latest timeout-minutes: 180 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 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) sudo apt-get update -qq "${APT_OPTS[@]}" || true sudo apt-get install -y -qq "${APT_OPTS[@]}" \ libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2t64 zip unzip ca-certificates - name: Install dependencies timeout-minutes: 15 env: ELECTRON_SKIP_BINARY_DOWNLOAD: '1' GIT_TERMINAL_PROMPT: '0' run: | set -euo pipefail git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" git config --global url."https://github.com/".insteadOf "git@github.com:" npm ci --ignore-scripts --no-audit --no-fund node node_modules/esbuild/install.js - name: Unit tests env: SKIP_INTEGRATION: '1' run: npm test - name: Install rcodesign run: | set -euo pipefail ARCH="$(uname -m)" case "$ARCH" in x86_64|amd64) HOST=linux-x64 ;; aarch64|arm64) HOST=linux-arm64 ;; *) exit 1 ;; esac sudo install -m 0755 "tools/rcodesign/${HOST}/rcodesign" /usr/local/bin/rcodesign rcodesign --version - name: Build server + client archives env: PEARDATA_SERVER_HOSTS: linux-x64,linux-arm64 PEARDATA_CLIENT_HOSTS: linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64 PEARDATA_SKIP_CLIENT: ${{ github.event.inputs.skip_client == 'true' && '1' || '0' }} DRY_RUN: '1' RELEASE_TAG: ${{ github.ref_name || 'manual' }} npm_config_build_from_source: 'false' PEARDATA_SKIP_REBUILD: '1' ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron electron_config_cache: ${{ github.workspace }}/.cache/electron PEARDATA_CLIENT_TIMEOUT_MS: '480000' CI: 'true' run: | set -euo pipefail mkdir -p "$ELECTRON_CACHE" .cache/electron-zips chmod +x scripts/gitea-rolling-release.sh scripts/bare-standalone.cjs scripts/make.cjs # Stage into dist/release without uploading (DRY_RUN=1) bash scripts/gitea-rolling-release.sh ls -la dist/release - name: Upload GitHub Release if: startsWith(github.ref, 'refs/tags/') && github.event.inputs.dry_run != 'true' uses: softprops/action-gh-release@v2 with: files: dist/release/* generate_release_notes: true body_path: dist/release/RELEASE_NOTES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}