On Linux, `titleBarStyle: 'hidden'` removes the title bar entirely, leaving no window controls (close/minimize/maximize). macOS has traffic lights and Windows has a custom title bar component, but Linux gets nothing. Fix this by omitting the hidden title bar style on Linux, which gives native window decorations from the desktop environment (GNOME, KDE, Hyprland, etc.). Also adds Linux build support: - electron-builder `linux` config targeting pacman (.pkg.tar.zst) - `dist:linux` script for standalone Linux builds - `release-linux` CI job on ubuntu-latest - `dist` script updated to include --linux
205 lines
4.8 KiB
YAML
205 lines
4.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Set version from tag
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
pnpm pkg set version="$VERSION"
|
|
|
|
- name: Build app
|
|
run: pnpm build
|
|
|
|
- name: Upload dist artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: |
|
|
out/renderer
|
|
dist-electron
|
|
retention-days: 1
|
|
|
|
release-mac:
|
|
needs: build
|
|
runs-on: macos-14
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download dist artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Setup Python for node-gyp
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Set version from tag
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
pnpm pkg set version="$VERSION"
|
|
|
|
- name: Build app (macOS)
|
|
run: pnpm build
|
|
|
|
- name: Verify packaged inputs (macOS)
|
|
run: |
|
|
test -f dist-electron/main/index.cjs
|
|
test -f dist-electron/preload/index.js
|
|
test -f out/renderer/index.html
|
|
|
|
- name: Package & Release (macOS)
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
run: pnpm dist:mac
|
|
|
|
release-win:
|
|
needs: build
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download dist artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Setup Python for node-gyp
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Set version from tag
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
shell: bash
|
|
run: |
|
|
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
pnpm pkg set version="$VERSION"
|
|
|
|
- name: Build app (Windows)
|
|
run: pnpm build
|
|
|
|
- name: Verify packaged inputs (Windows)
|
|
shell: bash
|
|
run: |
|
|
test -f dist-electron/main/index.cjs
|
|
test -f dist-electron/preload/index.js
|
|
test -f out/renderer/index.html
|
|
|
|
- name: Package & Release (Windows)
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: pnpm dist:win
|
|
|
|
release-linux:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download dist artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Setup Python for node-gyp
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Set version from tag
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
pnpm pkg set version="$VERSION"
|
|
|
|
- name: Build app (Linux)
|
|
run: pnpm build
|
|
|
|
- name: Verify packaged inputs (Linux)
|
|
run: |
|
|
test -f dist-electron/main/index.cjs
|
|
test -f dist-electron/preload/index.js
|
|
test -f out/renderer/index.html
|
|
|
|
- name: Package & Release (Linux)
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: pnpm dist:linux
|