Skip to content

feat(tags): browse tagged elements via project search #1277

feat(tags): browse tagged elements via project search

feat(tags): browse tagged elements via project search #1277

name: Electron Build Check
on:
pull_request:
types: [labeled, synchronize, opened]
paths:
# Electron-specific files
- "frontend/electron/**"
- "frontend/electron-builder.json"
# Angular app (runs inside Electron)
- "frontend/src/**"
# Build configuration
- "frontend/angular.json"
- "frontend/package.json"
- "frontend/tsconfig*.json"
# This workflow itself
- ".github/workflows/electron-build-check.yml"
concurrency:
group: electron-build-${{ github.ref }}
cancel-in-progress: true
jobs:
# ===========================================
# Electron Build - Windows
# ===========================================
build-windows:
name: Build (Windows)
permissions:
contents: read
# Run on path changes OR when 'check-installation' label is applied
if: github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'check-installation')
runs-on: windows-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: package.json
- name: Cache Bun dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build Angular app (Electron config)
run: cd frontend && npm run electron:build:angular
- name: Build Electron main process
run: cd frontend && npm run electron:build
- name: Package Electron app (Windows)
run: cd frontend && npx electron-builder --win --dir
env:
# Skip signing for CI builds
CSC_IDENTITY_AUTO_DISCOVERY: "false"
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: electron-build-windows
path: frontend/release/
retention-days: 3
# ===========================================
# Electron Build - macOS (Intel + Apple Silicon)
# ===========================================
build-macos:
name: Build (macOS)
permissions:
contents: read
# Run on path changes OR when 'check-installation' label is applied
if: github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'check-installation')
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: package.json
- name: Cache Bun dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build Angular app (Electron config)
run: cd frontend && npm run electron:build:angular
- name: Build Electron main process
run: cd frontend && npm run electron:build
- name: Package Electron app (macOS)
run: cd frontend && npx electron-builder --mac --dir
env:
# Skip signing for CI builds
CSC_IDENTITY_AUTO_DISCOVERY: "false"
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: electron-build-macos
path: frontend/release/
retention-days: 3
# ===========================================
# Electron Build - Linux
# ===========================================
build-linux:
name: Build (Linux)
permissions:
contents: read
# Run on path changes OR when 'check-installation' label is applied
if: github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'check-installation')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: package.json
- name: Cache Bun dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build Angular app (Electron config)
run: cd frontend && npm run electron:build:angular
- name: Build Electron main process
run: cd frontend && npm run electron:build
- name: Package Electron app (Linux)
run: cd frontend && npx electron-builder --linux --dir
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: electron-build-linux
path: frontend/release/
retention-days: 3
# ===========================================
# Summary job for PR status
# ===========================================
build-status:
name: Electron Build Status
if: always()
needs: [build-windows, build-macos, build-linux]
runs-on: ubuntu-latest
steps:
- name: Check build results
run: |
win="${{ needs.build-windows.result }}"
mac="${{ needs.build-macos.result }}"
linux="${{ needs.build-linux.result }}"
# Treat concurrency-cancelled jobs as non-failures. With
# concurrency.cancel-in-progress: true, superseded runs have their
# platform jobs cancelled mid-flight — that's intentional and not a
# real build failure, so the aggregate status should not turn red.
cancelled=0
for r in "$win" "$mac" "$linux"; do
if [[ "$r" == "cancelled" ]]; then
cancelled=$((cancelled + 1))
fi
done
if [[ "$win" == "success" && "$mac" == "success" && "$linux" == "success" ]]; then
echo "✅ All Electron builds completed successfully for Windows, macOS, and Linux"
elif [[ "$win" == "skipped" && "$mac" == "skipped" && "$linux" == "skipped" ]]; then
echo "⏭️ Electron builds skipped (no relevant changes)"
elif [[ "$cancelled" -gt 0 && "$win" != "failure" && "$mac" != "failure" && "$linux" != "failure" ]]; then
echo "⏭️ Electron builds cancelled by concurrency (superseded by a newer run) — not a real failure"
else
echo "❌ Some Electron builds failed"
exit 1
fi