Skip to content

fix(frontend): offset block hover actions from content #140

fix(frontend): offset block hover actions from content

fix(frontend): offset block hover actions from content #140

Workflow file for this run

name: Release - Desktop App
permissions:
contents: write
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AWS_REGION: us-east-1
jobs:
build-info:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Version
id: set_version
run: |
VERSION=${{ github.ref_name }}
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Display Version
run: |
echo "App Version: ${{ steps.set_version.outputs.version }}"
# Build and validate deploy script (fail-fast before expensive builds)
deploy-script:
uses: ./.github/workflows/check-deploy-script.yml
# Use the reusable parallel test workflow
frontend-tests:
needs: [build-info]
uses: ./.github/workflows/test-frontend-parallel.yml
with:
run-integration-tests: false
build-binaries:
timeout-minutes: 30
name: Build ${{ matrix.config.os }} @ ${{ matrix.config.arch }}
runs-on: ${{ matrix.config.os }}
needs: [build-info, frontend-tests, deploy-script]
strategy:
matrix:
config:
- os: macos-15-large
arch: x64
goarch: amd64
daemon_name: x86_64-apple-darwin
- os: macos-15-xlarge
arch: arm64
goarch: arm64
daemon_name: aarch64-apple-darwin
- os: ubuntu-latest
arch: x64
goarch: amd64
daemon_name: x86_64-unknown-linux-gnu
- os: windows-2025
arch: x64
goarch: amd64
daemon_name: x86_64-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true
- name: Download GGUF model (Unix)
if: matrix.config.os != 'windows-2025'
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi
- name: Download GGUF model (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: pwsh
run: |
$modelPath = "backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf"
if (-not (Test-Path $modelPath)) {
New-Item -ItemType Directory -Force -Path "backend/llm/backends/llamacpp/models"
Invoke-WebRequest -Uri "https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true" -OutFile $modelPath
}
- uses: ./.github/actions/ci-setup
with:
matrix-os: ${{ matrix.config.os }}
# matrix-target: ${{ matrix.config.daemon_name }}
# matrix-arch: ${{ matrix.config.arch }}
- name: Build Backend (Linux)
if: matrix.config.os == 'ubuntu-latest'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
- name: Build Backend (macOS)
if: startsWith(matrix.config.os, 'macos')
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
MACOSX_DEPLOYMENT_TARGET: '13.0'
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
- name: Build Backend (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: 'windows'
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
CGO_LDFLAGS: -static-libgcc -static-libstdc++
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
- name: Stage Windows runtime DLL
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
set -euo pipefail
DLL_PATH="$(gcc -print-file-name=libwinpthread-1.dll)"
if [ ! -f "$DLL_PATH" ]; then
echo "ERROR: libwinpthread-1.dll not found in gcc toolchain"
exit 1
fi
cp "$DLL_PATH" plz-out/bin/backend/libwinpthread-1.dll
ls -la plz-out/bin/backend/libwinpthread-1.dll
- name: Verify Windows daemon runtime deps
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
set -euo pipefail
BIN="plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe"
if ! command -v objdump >/dev/null 2>&1; then
echo "objdump not available on runner; skipping dependency check"
exit 0
fi
DLLS="$(objdump -p "$BIN" | awk '/DLL Name:/ {print $3}')"
echo "Windows DLL imports:"
echo "$DLLS"
if echo "$DLLS" | grep -Eiq '^(libstdc\+\+-6\.dll|libgcc_s_seh-1\.dll|libgomp-1\.dll)$'; then
echo "ERROR: MinGW runtime DLL dependency is still present"
exit 1
fi
if echo "$DLLS" | grep -Eiq '^libwinpthread-1\.dll$'; then
if [ ! -f "plz-out/bin/backend/libwinpthread-1.dll" ]; then
echo "ERROR: daemon imports libwinpthread-1.dll but runtime DLL is not staged"
exit 1
fi
echo "libwinpthread-1.dll import detected and staged correctly"
fi
- name: Set MacOS signing certs
if: startsWith(matrix.config.os, 'macos')
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p $APPLE_KEYCHAIN_PASSWORD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $APPLE_KEYCHAIN_PASSWORD build.keychain
security import certificate.p12 -k build.keychain -P $APPLE_CERTIFICATE_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k $APPLE_KEYCHAIN_PASSWORD build.keychain
rm -fr *.p12
security set-keychain-settings -lut 1200 # prevent the keychain to get locked before codesign is done
- name: Set temporal version in package.json
run: |
node scripts/set-desktop-version.mjs
env:
VITE_VERSION: '${{ needs.build-info.outputs.version }}'
- name: Build, package & make (Unix)
if: matrix.config.os != 'windows-2025'
run: |
pnpm desktop:make --arch=${{ matrix.config.arch }}
env:
timeout-minutes: 10
DEBUG: electron-*
NODE_OPTIONS: --max_old_space_size=8192
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
DAEMON_NAME: ${{ matrix.config.daemon_name }}
VITE_VERSION: '${{ needs.build-info.outputs.version }}'
VITE_COMMIT_HASH: '${{ github.sha }}'
VITE_DESKTOP_P2P_PORT: '56000'
VITE_DESKTOP_HTTP_PORT: '56001'
VITE_DESKTOP_GRPC_PORT: '56002'
VITE_METRIC_SERVER_HTTP_PORT: '56003'
VITE_DESKTOP_APPDATA: 'Seed'
VITE_DESKTOP_HOSTNAME: 'http://localhost'
VITE_LIGHTNING_API_URL: 'https://ln.seed.hyper.media'
VITE_GATEWAY_URL: 'https://hyper.media'
VITE_NOTIFY_SERVICE_HOST: 'https://notify.seed.hyper.media'
VITE_DESKTOP_SENTRY_DSN: '${{ secrets.DESKTOP_SENTRY_DSN }}'
VITE_SEED_HOST_URL: 'https://host.seed.hyper.media'
VITE_PLAUSIBLE_DOMAIN: 'stats.desktop.seedhypermedia.com'
SENTRY_AUTH_TOKEN: '${{ secrets.SENTRY_AUTH_TOKEN }}'
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Ensure 7-Zip is in PATH (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: powershell
run: |
# Squirrel.Windows needs 7z.exe for CreateZipFromDirectory
if (Test-Path "C:\Program Files\7-Zip") {
echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Host "Added 7-Zip to PATH"
} else {
choco install 7zip -y
echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Host "Installed and added 7-Zip to PATH"
}
- name: Build, package and make (Win32)
if: startsWith(matrix.config.os, 'windows')
run: |
pnpm desktop:make --arch=${{ matrix.config.arch }}
env:
timeout-minutes: 10
DEBUG: electron-*
NODE_OPTIONS: --max_old_space_size=6144
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
DAEMON_NAME: '${{ matrix.config.daemon_name }}.exe'
VITE_VERSION: '${{ needs.build-info.outputs.version }}'
VITE_COMMIT_HASH: '${{ github.sha }}'
VITE_DESKTOP_P2P_PORT: '56000'
VITE_DESKTOP_HTTP_PORT: '56001'
VITE_DESKTOP_GRPC_PORT: '56002'
VITE_METRIC_SERVER_HTTP_PORT: '56003'
VITE_DESKTOP_APPDATA: 'Seed'
VITE_DESKTOP_HOSTNAME: 'http://localhost'
VITE_LIGHTNING_API_URL: 'https://ln.seed.hyper.media'
VITE_GATEWAY_URL: 'https://hyper.media'
VITE_NOTIFY_SERVICE_HOST: 'https://notify.seed.hyper.media'
VITE_DESKTOP_SENTRY_DSN: '${{ secrets.DESKTOP_SENTRY_DSN }}'
VITE_SEED_HOST_URL: 'https://host.seed.hyper.media'
VITE_PLAUSIBLE_DOMAIN: 'stats.desktop.seedhypermedia.com'
SENTRY_AUTH_TOKEN: '${{ secrets.SENTRY_AUTH_TOKEN }}'
- name: Upload daemon debug info to Sentry (Unix)
if: matrix.config.os != 'windows-2025' && env.SENTRY_AUTH_TOKEN != ''
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: mintter
SENTRY_PROJECT: seed-electron
run: |
node scripts/upload-daemon-symbols.mjs \
plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}
# - name: Upload daemon debug info to Sentry (Windows)
# if: startsWith(matrix.config.os, 'windows') && env.SENTRY_AUTH_TOKEN != ''
# shell: bash
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: mintter
# SENTRY_PROJECT: seed-electron
# run: |
# node scripts/upload-daemon-symbols.mjs \
# plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.config.daemon_name }}
path: frontend/apps/desktop/out/make/**/*
publish-to-github:
needs: [build-info, build-binaries]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: 'create release'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
tag_name: '${{ needs.build-info.outputs.version }}'
prerelease: true
generate_release_notes: true
files: |
./artifacts/artifacts-*/**/*
./artifacts/deploy-script/deploy.js