CI / check (push) Canceled after 0s
CI / check-windows (push) Canceled after 0s
CI / check-linux (push) Canceled after 0s
Website / build (push) Canceled after 0s
Website / deploy (push) Canceled after 0s
Build / macOS (universal .dmg) (push) Canceled after 0s
Build / Windows (x64 .exe) (push) Canceled after 0s
Build / Linux (x64 .AppImage + .deb) (push) Canceled after 0s
Build / Publish release (push) Canceled after 0s
- Marks land on the right control (points vs pixels, OCR-tolerant names, browser pages listed) and appear as their words are spoken. - A Sparkle-style update window: what's new, Install and Relaunch / Install on Quit / Skip This Version; the update box fills while downloading. - 3D closes on a click outside, really closes, caps frames, lowers quality when slow, pauses when idle and rebuilds after a graphics reset. - Releases are signed with Pixie's own certificate so macOS keeps permissions across updates. - Dictation falls back to the clipboard; the helper gives up on slow apps; locks survive a panic. - README and site pictures drawn by Pixie's overlay; new logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
300 lines
13 KiB
YAML
300 lines
13 KiB
YAML
name: Build
|
||
|
||
# Builds Pixie for macOS (universal .dmg), Windows (.exe installer) and Linux (.AppImage, .deb).
|
||
# • every push to main that touches the app → downloadable artifacts on the run page
|
||
# • Actions → Build → "Run workflow" → the same, on demand (give a tag to also release)
|
||
# • pushing a tag like v0.5.1 → builds both and publishes a GitHub release
|
||
# Release assets keep stable names so the website can link to
|
||
# https://github.com/<owner>/<repo>/releases/latest/download/Pixie-macOS-universal.dmg
|
||
# https://github.com/<owner>/<repo>/releases/latest/download/Pixie-Windows-x64-setup.exe
|
||
# https://github.com/<owner>/<repo>/releases/latest/download/Pixie-Linux-x64.AppImage
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
tags: ["v*"]
|
||
paths:
|
||
- "apps/**"
|
||
- "crates/**"
|
||
- "resources/**"
|
||
- "skills/**"
|
||
- "scripts/finalize-app.mjs"
|
||
- "Cargo.*"
|
||
- "package*.json"
|
||
- ".github/workflows/build.yml"
|
||
workflow_dispatch:
|
||
inputs:
|
||
tag:
|
||
description: "Also publish a release with this tag (e.g. v0.5.1). Leave empty for artifacts only."
|
||
required: false
|
||
default: ""
|
||
|
||
permissions:
|
||
contents: write
|
||
|
||
concurrency:
|
||
group: build-${{ github.ref }}
|
||
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||
|
||
env:
|
||
TAG: ${{ github.event.inputs.tag || (startsWith(github.ref, 'refs/tags/') && github.ref_name) || '' }}
|
||
# Auto-update signing (Settings → Secrets → Actions). Without them builds still work, just
|
||
# without update packages, so installed copies won't see that release.
|
||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||
|
||
jobs:
|
||
macos:
|
||
name: macOS (universal .dmg)
|
||
runs-on: macos-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 20
|
||
cache: npm
|
||
- uses: dtolnay/rust-toolchain@stable
|
||
with:
|
||
targets: aarch64-apple-darwin,x86_64-apple-darwin
|
||
- uses: Swatinem/rust-cache@v2
|
||
with:
|
||
key: macos-universal
|
||
- run: npm ci
|
||
|
||
# Optional: real Developer ID signing + notarization when these repo secrets exist
|
||
# (APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_SIGNING_IDENTITY, APPLE_ID,
|
||
# APPLE_PASSWORD, APPLE_TEAM_ID). Without them the app is ad-hoc signed and users open it
|
||
# once with right-click → Open.
|
||
- name: Signing environment
|
||
env:
|
||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||
run: |
|
||
for v in APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID; do
|
||
if [ -n "${!v}" ]; then
|
||
{ echo "$v<<__EOF__"; echo "${!v}"; echo "__EOF__"; } >> "$GITHUB_ENV"
|
||
fi
|
||
done
|
||
[ -n "$APPLE_SIGNING_IDENTITY" ] && echo "Developer ID signing on" || echo "No Developer ID"
|
||
|
||
# Without a Developer ID: sign with Pixie's own self-signed certificate (repo secrets
|
||
# PIXIE_CODESIGN_P12, base64 of the .p12, and PIXIE_CODESIGN_PASSWORD). Every release then
|
||
# carries the same identity, so macOS keeps Screen Recording, Accessibility and the
|
||
# microphone on across updates; ad-hoc builds lose them on each one. Tauri only imports
|
||
# Apple-issued certificates itself, so this step puts ours in a keychain of its own and
|
||
# hands Tauri the name.
|
||
- name: Self-signed signing
|
||
env:
|
||
PIXIE_CODESIGN_P12: ${{ secrets.PIXIE_CODESIGN_P12 }}
|
||
PIXIE_CODESIGN_PASSWORD: ${{ secrets.PIXIE_CODESIGN_PASSWORD }}
|
||
run: |
|
||
set -euo pipefail
|
||
if [ -n "${APPLE_SIGNING_IDENTITY:-}" ] || [ -z "$PIXIE_CODESIGN_P12" ]; then
|
||
[ -n "${APPLE_SIGNING_IDENTITY:-}" ] || echo "Ad-hoc signing (no PIXIE_CODESIGN_P12)"
|
||
exit 0
|
||
fi
|
||
KC="$RUNNER_TEMP/pixie-sign.keychain-db"
|
||
KP=$(openssl rand -hex 16)
|
||
echo "$PIXIE_CODESIGN_P12" | base64 --decode > "$RUNNER_TEMP/id.p12"
|
||
security create-keychain -p "$KP" "$KC"
|
||
security set-keychain-settings -t 3600 -u "$KC"
|
||
security unlock-keychain -p "$KP" "$KC"
|
||
security import "$RUNNER_TEMP/id.p12" -k "$KC" -P "$PIXIE_CODESIGN_PASSWORD" -T /usr/bin/codesign
|
||
rm -f "$RUNNER_TEMP/id.p12"
|
||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KP" "$KC" > /dev/null
|
||
security list-keychains -d user -s "$KC" $(security list-keychains -d user | tr -d '"')
|
||
security find-identity -p codesigning "$KC" | grep -q '"Pixie Self-Signed"'
|
||
echo "APPLE_SIGNING_IDENTITY=Pixie Self-Signed" >> "$GITHUB_ENV"
|
||
echo "Self-signed signing on"
|
||
|
||
- name: Build universal app + dmg
|
||
run: npm run app:build:universal
|
||
|
||
- name: Collect
|
||
run: |
|
||
set -euo pipefail
|
||
BUNDLE=target/universal-apple-darwin/release/bundle
|
||
mkdir -p out
|
||
# Which identity the app carries; a release that should be signed and isn't stops here.
|
||
codesign -dvv "$BUNDLE/macos/Pixie.app" 2>&1 | grep -E '^(Authority|Signature|TeamIdentifier)=' || true
|
||
if [ -n "${APPLE_SIGNING_IDENTITY:-}" ]; then
|
||
codesign -dr - "$BUNDLE/macos/Pixie.app" 2>&1 | grep -q 'certificate leaf'
|
||
fi
|
||
cp "$BUNDLE"/dmg/*.dmg out/Pixie-macOS-universal.dmg
|
||
ditto -c -k --keepParent "$BUNDLE/macos/Pixie.app" out/Pixie-macOS-universal.zip
|
||
if [ -f "$BUNDLE/macos/Pixie.app.tar.gz" ]; then
|
||
cp "$BUNDLE/macos/Pixie.app.tar.gz" out/Pixie-macOS-universal.app.tar.gz
|
||
cp "$BUNDLE/macos/Pixie.app.tar.gz.sig" out/Pixie-macOS-universal.app.tar.gz.sig
|
||
fi
|
||
ls -la out
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: Pixie-macOS
|
||
path: out/*
|
||
if-no-files-found: error
|
||
|
||
windows:
|
||
name: Windows (x64 .exe)
|
||
runs-on: windows-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 20
|
||
cache: npm
|
||
- uses: dtolnay/rust-toolchain@stable
|
||
- uses: Swatinem/rust-cache@v2
|
||
with:
|
||
key: windows-x64
|
||
- run: npm ci
|
||
|
||
- name: Build installer
|
||
shell: bash
|
||
run: |
|
||
# Signed update packages only when the key is there.
|
||
if [ -n "$TAURI_SIGNING_PRIVATE_KEY" ]; then EXTRA='--config {"bundle":{"createUpdaterArtifacts":true}}'; else EXTRA=""; fi
|
||
npm run tauri -w apps/desktop -- build --bundles nsis $EXTRA
|
||
|
||
- name: Collect
|
||
shell: bash
|
||
run: |
|
||
set -euo pipefail
|
||
mkdir -p out
|
||
cp target/release/bundle/nsis/*-setup.exe out/Pixie-Windows-x64-setup.exe
|
||
for f in target/release/bundle/nsis/*-setup.exe.sig; do [ -f "$f" ] && cp "$f" out/Pixie-Windows-x64-setup.exe.sig; done
|
||
ls -la out
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: Pixie-Windows
|
||
path: out/*
|
||
if-no-files-found: error
|
||
|
||
linux:
|
||
name: Linux (x64 .AppImage + .deb)
|
||
# Ubuntu 22.04 so the AppImage runs on older glibc too.
|
||
runs-on: ubuntu-22.04
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- name: System libraries
|
||
run: |
|
||
sudo apt-get update
|
||
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libasound2-dev patchelf
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 20
|
||
cache: npm
|
||
- uses: dtolnay/rust-toolchain@stable
|
||
- uses: Swatinem/rust-cache@v2
|
||
with:
|
||
key: linux-x64
|
||
- run: npm ci
|
||
|
||
- name: Build AppImage + deb
|
||
run: |
|
||
if [ -n "$TAURI_SIGNING_PRIVATE_KEY" ]; then EXTRA='--config {"bundle":{"createUpdaterArtifacts":true}}'; else EXTRA=""; fi
|
||
npm run tauri -w apps/desktop -- build --bundles appimage,deb $EXTRA
|
||
|
||
- name: Collect
|
||
run: |
|
||
set -euo pipefail
|
||
mkdir -p out
|
||
cp target/release/bundle/appimage/*.AppImage out/Pixie-Linux-x64.AppImage
|
||
cp target/release/bundle/deb/*.deb out/Pixie-Linux-x64.deb
|
||
for f in target/release/bundle/appimage/*.AppImage.sig; do [ -f "$f" ] && cp "$f" out/Pixie-Linux-x64.AppImage.sig; done
|
||
ls -la out
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: Pixie-Linux
|
||
path: out/*
|
||
if-no-files-found: error
|
||
|
||
release:
|
||
name: Publish release
|
||
# Linux is a preview: a failed Linux build doesn't hold the release back.
|
||
needs: [macos, windows, linux]
|
||
if: ${{ always() && needs.macos.result == 'success' && needs.windows.result == 'success' && (startsWith(github.ref, 'refs/tags/') || github.event.inputs.tag != '') }}
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/download-artifact@v4
|
||
with:
|
||
path: dist
|
||
merge-multiple: true
|
||
- name: Versioned copies, checksums, notes
|
||
run: |
|
||
set -euo pipefail
|
||
VERSION="${TAG#v}"
|
||
cd dist
|
||
cp Pixie-macOS-universal.dmg "Pixie_${VERSION}_macOS_universal.dmg"
|
||
cp Pixie-Windows-x64-setup.exe "Pixie_${VERSION}_Windows_x64-setup.exe"
|
||
[ -f Pixie-Linux-x64.AppImage ] && cp Pixie-Linux-x64.AppImage "Pixie_${VERSION}_Linux_x64.AppImage"
|
||
sha256sum *.dmg *.zip *.exe *.AppImage *.deb > SHA256SUMS.txt 2>/dev/null || sha256sum *.dmg *.zip *.exe > SHA256SUMS.txt
|
||
ls -la
|
||
cd ..
|
||
# Release notes: this version's section of CHANGELOG.md.
|
||
awk -v v="$VERSION" '$0 ~ "^## "v" " {f=1; next} /^## / && f {exit} f' CHANGELOG.md > notes.md || true
|
||
cat >> notes.md <<'NOTES'
|
||
|
||
---
|
||
**macOS** (Apple Silicon and Intel, macOS 14+): **Pixie-macOS-universal.dmg**. If macOS says it can’t check the app, right-click Pixie in Applications → Open once.
|
||
|
||
**Windows** (preview, 64-bit Windows 10/11): **Pixie-Windows-x64-setup.exe**. Voice uses Windows speech recognition (turn on Settings → Privacy & security → Speech → Online speech recognition). SmartScreen may ask once: More info → Run anyway.
|
||
|
||
**Linux** (preview, x64): **Pixie-Linux-x64.AppImage** or the **.deb**. Chat, agents and screen reading work; voice input doesn't yet. Install grim or scrot, tesseract and xdotool for seeing and clicking.
|
||
|
||
What works where: [CHECKLIST.md](https://github.com/s41r4j/pixie/blob/main/CHECKLIST.md).
|
||
NOTES
|
||
|
||
- name: latest.json (what installed copies check for updates)
|
||
run: |
|
||
set -euo pipefail
|
||
VERSION="${TAG#v}"
|
||
BASE="https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG}"
|
||
python3 - "$VERSION" "$BASE" <<'PY'
|
||
import json, sys, os, datetime
|
||
version, base = sys.argv[1], sys.argv[2]
|
||
notes = open("notes.md").read().split("\n---\n")[0].strip()
|
||
def entry(file):
|
||
sig = f"dist/{file}.sig"
|
||
return {"signature": open(sig).read().strip(), "url": f"{base}/{file}"} if os.path.exists(sig) else None
|
||
mac = entry("Pixie-macOS-universal.app.tar.gz")
|
||
platforms = {
|
||
"darwin-aarch64": mac, "darwin-x86_64": mac,
|
||
"windows-x86_64": entry("Pixie-Windows-x64-setup.exe"),
|
||
"linux-x86_64": entry("Pixie-Linux-x64.AppImage"),
|
||
}
|
||
platforms = {k: v for k, v in platforms.items() if v}
|
||
if not platforms:
|
||
print("No update signatures (TAURI_SIGNING_PRIVATE_KEY not set): skipping latest.json")
|
||
sys.exit(0)
|
||
data = {"version": version, "notes": notes, "pub_date": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), "platforms": platforms}
|
||
json.dump(data, open("dist/latest.json", "w"), indent=2)
|
||
print(json.dumps(data, indent=2)[:2000])
|
||
PY
|
||
|
||
- name: Publish
|
||
uses: softprops/action-gh-release@v2
|
||
with:
|
||
tag_name: ${{ env.TAG }}
|
||
name: Pixie ${{ env.TAG }}
|
||
body_path: notes.md
|
||
files: |
|
||
dist/Pixie-macOS-universal.dmg
|
||
dist/Pixie-macOS-universal.zip
|
||
dist/Pixie_*_macOS_universal.dmg
|
||
dist/Pixie-Windows-x64-setup.exe
|
||
dist/Pixie_*_Windows_x64-setup.exe
|
||
dist/Pixie-Linux-x64.AppImage
|
||
dist/Pixie_*_Linux_x64.AppImage
|
||
dist/Pixie-Linux-x64.deb
|
||
dist/Pixie-macOS-universal.app.tar.gz
|
||
dist/*.sig
|
||
dist/latest.json
|
||
dist/SHA256SUMS.txt
|