mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 12:52:11 +03:00
* chore(release): continue v3.8.25 development cycle after main code-sync (r5) main fast-forwarded to release/v3.8.25 (#3863): unblocked Build+Docker via #3864, plus #3837 (mimocode proxy) and #3862 (trivy bump). This marker re-opens the umbrella PR for further v3.8.25 work. No version bump. * fix(db): persist the Keep-latest-backups retention setting (#3834) (#3867) * fix(oauth): clear GitLab Duo setup message instead of 500 (#3861) (#3868) * test(oauth): prove refresh_token preserved on real gemini-cli/antigravity dispatch (#3850) (#3869) * feat(compression-ui): unified compression config UI — per-engine pages + combos editor + menu + WS default-on (#3860) Integrated into release/v3.8.25 — feat(compression-ui): unified compression configuration UI (Compression Hub + per-engine Lite/Aggressive/Ultra pages + combos editor + sidebar entry + live-WS default-on). File-size re-baselined for sidebarVisibility.ts/chatCore.ts growth; orphan ws test relocated to a collected path. * docs(changelog): complete the v3.8.25 release notes + credit all contributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios #3848, compression UI #3860, injection-guard #3857, kiro discovery #3836, Veo #3839, mimocode proxy #3837, Arena ELO flag #3821), 9 more Fixed entries (#3811/#3807/#3759/#3849/#3838/#3835/#3814/#3820/#3819), a Security section (CCR IDOR #3859, supply-chain #3824), and an Internal/Quality section. Every contributor and issue reporter is now credited. * docs(changelog): restore + complete the v3.8.25 release notes Re-adds CHANGELOG.md (a prior server-side commit accidentally dropped it) with the complete, audited [3.8.25] section: New Features, the full Fixed list, Security & Hardening, and Internal/Quality — every contributor and issue reporter credited. * chore(release): finalize v3.8.25 — reconcile CHANGELOG + i18n mirrors, document OMNIROUTE_MAX_PENDING_MIGRATIONS, green the unit suite Release-gate reconciliation for v3.8.25: - CHANGELOG: dated 2026-06-14, linked #3826, rolled up file-size re-baselines (#3823/#3833), recorded the test-greening; re-synced all 41 i18n CHANGELOG mirrors. - Documented OMNIROUTE_MAX_PENDING_MIGRATIONS (#3416) in .env.example + ENVIRONMENT.md. - Greened the unit suite (was merged red on 4 CI shards): aligned 10 stale tests to this cycle's intended behavior (#3838/#3822/#3501/SOCKS5/Vertex-Express/Antigravity) and the same-provider 503 fall-through test; de-flaked the compression benchmark reproducibility and ServiceSupervisor crash tests. No production code changed. * ci(security): clear OpenSSF Scorecard code-scanning noise + harden workflow token permissions The Security tab held 155 open alerts, ALL from the advisory OpenSSF Scorecard tool (#3824) — supply-chain/posture scores, not code vulnerabilities — which drowned out real CodeQL findings. - scorecard.yml: stop uploading SARIF to the code-scanning tab (drop the upload-sarif step + the now-unused security-events: write). The run still produces the OpenSSF badge (publish_results) and a downloadable SARIF artifact. - TokenPermissions hardening (the high-severity, genuinely-valuable subset): set each workflow's top-level token to read-only and grant the exact writes at the job level that needs them — npm-publish (id-token/packages on publish jobs), docker-publish (packages on build), electron-release (contents on build/release, id-token/packages on publish-npm), build-fork (packages on build), claude (empty top-level; job grants its own). The 155 existing alerts were dismissed. Not adopting repo-wide SHA-pinning (143 PinnedDependencies advisories) — declined. * test(integration): align stale wiring/socks5 integration tests to this cycle's behavior These were red on the CI Integration job (pre-existing). No production code changed: - integration-wiring: the combos page no longer renders a per-page EmailPrivacyToggle (#3822 consolidated it into Settings → Appearance); the provider-detail test-result masking and upstream-proxy copy moved to decomposed components (#3501 BatchTestResultsModal / UpstreamProxyCard) — assertions now read the owning files. - api-routes-critical: SOCKS5 is now enabled by default (opt-out), so the disabled- rejection test must set ENABLE_SOCKS5_PROXY=false explicitly (an unset env now means enabled). (The ~32 live-Gemini integration tests are gated on OMNIROUTE_API_KEY and skip in CI; they only 'fail' locally when that key is present without a running server.)
262 lines
8.7 KiB
YAML
262 lines
8.7 KiB
YAML
name: Build Electron Desktop App
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Release version (e.g., v1.6.8)"
|
|
required: true
|
|
type: string
|
|
|
|
# Least-privilege default: read-only at the top level; each job grants the writes it
|
|
# needs (build/release upload assets, publish-npm forwards npm provenance / packages
|
|
# to the reusable workflow) — Scorecard TokenPermissions.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate version
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
version: ${{ steps.validate.outputs.version }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Validate version format
|
|
id: validate
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "push" ]]; then
|
|
VERSION="${GITHUB_REF#refs/tags/}"
|
|
else
|
|
VERSION="${{ inputs.version }}"
|
|
fi
|
|
|
|
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "Error: Invalid version format. Expected: v1.6.8"
|
|
exit 1
|
|
fi
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "✓ Valid version: $VERSION"
|
|
|
|
build:
|
|
name: Build Electron (${{ matrix.platform }})
|
|
needs: validate
|
|
runs-on: ${{ matrix.runner }}
|
|
permissions:
|
|
contents: write # electron-builder may publish artifacts with GH_TOKEN
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: windows
|
|
runner: windows-latest
|
|
target: win
|
|
ext: .exe
|
|
- platform: macos-intel
|
|
runner: macos-15-intel
|
|
target: mac-x64
|
|
ext: .dmg
|
|
- platform: macos-arm64
|
|
runner: macos-latest
|
|
target: mac-arm64
|
|
ext: -arm64.dmg
|
|
- platform: linux
|
|
runner: ubuntu-latest
|
|
target: linux
|
|
ext: .AppImage
|
|
deb_ext: .deb
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
env:
|
|
NPM_CONFIG_LEGACY_PEER_DEPS: true
|
|
|
|
- name: Sanitize Windows home directory
|
|
if: runner.os == 'Windows'
|
|
shell: bash
|
|
run: |
|
|
# The default USERPROFILE contains junction points (Application Data)
|
|
# that cause EPERM errors during Next.js standalone build glob scans.
|
|
# Create a clean temp profile directory to avoid this.
|
|
mkdir -p "$RUNNER_TEMP/home"
|
|
echo "USERPROFILE=$RUNNER_TEMP/home" >> $GITHUB_ENV
|
|
|
|
- name: Build Next.js standalone
|
|
env:
|
|
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
|
|
NODE_OPTIONS: "--max_old_space_size=6144"
|
|
run: npm run build
|
|
|
|
- name: Sync version in electron/package.json
|
|
shell: bash
|
|
run: |
|
|
VERSION="${{ needs.validate.outputs.version }}"
|
|
VERSION_NO_V="${VERSION#v}"
|
|
node -e "
|
|
const fs = require('fs');
|
|
const pkg = JSON.parse(fs.readFileSync('electron/package.json'));
|
|
pkg.version = '$VERSION_NO_V';
|
|
fs.writeFileSync('electron/package.json', JSON.stringify(pkg, null, 2) + '\\n');
|
|
"
|
|
echo "✓ electron/package.json version set to $VERSION_NO_V"
|
|
|
|
- name: Install fpm (Linux .deb packaging tool)
|
|
if: matrix.platform == 'linux'
|
|
run: sudo gem install fpm --no-document
|
|
|
|
- name: Install Electron dependencies
|
|
working-directory: electron
|
|
run: npm install --no-audit --no-fund
|
|
|
|
- name: Build Electron for ${{ matrix.platform }}
|
|
working-directory: electron
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: npm run build:${{ matrix.target }}
|
|
|
|
- name: Smoke packaged Electron app
|
|
if: matrix.platform != 'linux'
|
|
# Best-effort smoke on Windows + macos-arm64:
|
|
# - Windows: requestSingleInstanceLock() fails due to USERPROFILE
|
|
# sanitization needed for the build step.
|
|
# - macos-arm64: the headless GitHub arm64 runner crashes Electron's GPU
|
|
# process (gpu_process_host exit_code=15 → network service crash →
|
|
# "No rendezvous client, terminating process"), so the app can't bind
|
|
# 127.0.0.1:20128 in time. The identical bundle is smoke-gated on
|
|
# macos-intel + linux, so packaging is still verified per-OS; we don't
|
|
# let the arm64 runner's GPU flakiness block the desktop release.
|
|
continue-on-error: ${{ matrix.platform == 'windows' || matrix.platform == 'macos-arm64' }}
|
|
env:
|
|
ELECTRON_SMOKE_TIMEOUT_MS: 60000
|
|
ELECTRON_SMOKE_STREAM_LOGS: "1"
|
|
run: npm run electron:smoke:packaged
|
|
|
|
- name: Smoke packaged Electron app (Linux)
|
|
if: matrix.platform == 'linux'
|
|
env:
|
|
ELECTRON_SMOKE_TIMEOUT_MS: 60000
|
|
ELECTRON_SMOKE_STREAM_LOGS: "1"
|
|
run: xvfb-run -a npm run electron:smoke:packaged
|
|
|
|
- name: Collect installers
|
|
shell: bash
|
|
run: |
|
|
mkdir -p release-assets
|
|
cd electron/dist-electron
|
|
# Copy only installer files for this platform
|
|
for file in *${{ matrix.ext }}; do
|
|
[ -f "$file" ] && cp "$file" ../../release-assets/
|
|
done
|
|
# Linux: also copy .deb package
|
|
if [ "${{ matrix.platform }}" = "linux" ]; then
|
|
for file in *.deb; do
|
|
[ -f "$file" ] && cp "$file" ../../release-assets/
|
|
done
|
|
fi
|
|
# Windows: also copy portable standalone exe as OmniRoute.exe
|
|
if [ "${{ matrix.platform }}" = "windows" ]; then
|
|
for file in *.exe; do
|
|
# Skip the NSIS installer (contains "Setup")
|
|
case "$file" in *Setup*) continue ;; esac
|
|
[ -f "$file" ] && cp "$file" "../../release-assets/OmniRoute.exe" && break
|
|
done
|
|
fi
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: electron-${{ matrix.platform }}
|
|
path: release-assets/
|
|
|
|
release:
|
|
name: Create Release
|
|
needs: [validate, build]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # softprops/action-gh-release creates the GitHub Release
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: release-assets
|
|
merge-multiple: true
|
|
|
|
- name: Create source archives
|
|
run: |
|
|
# Create source code archives (excluding dev dependencies and build artifacts)
|
|
export TARBALL="OmniRoute-${{ needs.validate.outputs.version }}.source.tar.gz"
|
|
export ZIPBALL="OmniRoute-${{ needs.validate.outputs.version }}.source.zip"
|
|
|
|
# Use git archive for clean source export
|
|
git archive --format=tar.gz --prefix=OmniRoute-${{ needs.validate.outputs.version }}/ HEAD -o "release-assets/$TARBALL"
|
|
git archive --format=zip --prefix=OmniRoute-${{ needs.validate.outputs.version }}/ HEAD -o "release-assets/$ZIPBALL"
|
|
|
|
echo "✓ Created source archives:"
|
|
ls -lh "release-assets/$TARBALL" "release-assets/$ZIPBALL"
|
|
|
|
- name: List release files
|
|
run: ls -la release-assets/
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ needs.validate.outputs.version }}
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: false
|
|
files: |
|
|
release-assets/*.dmg
|
|
release-assets/*.exe
|
|
release-assets/*.AppImage
|
|
release-assets/*.deb
|
|
release-assets/*.blockmap
|
|
release-assets/*.source.tar.gz
|
|
release-assets/*.source.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish-npm:
|
|
name: Publish to npm
|
|
needs: [validate, release]
|
|
permissions:
|
|
contents: read
|
|
id-token: write # npm provenance (forwarded to the reusable workflow)
|
|
packages: write # publish to npm.pkg.github.com
|
|
uses: ./.github/workflows/npm-publish.yml
|
|
with:
|
|
version: ${{ needs.validate.outputs.version }}
|
|
tag: latest
|
|
secrets:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|