Skip to content

feat: add plan mode, PR agent, and major generator improvements #30

feat: add plan mode, PR agent, and major generator improvements

feat: add plan mode, PR agent, and major generator improvements #30

Workflow file for this run

name: Desktop Release

Check failure on line 1 in .github/workflows/desktop-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/desktop-release.yml

Invalid workflow file

(Line: 56, Col: 9): Unrecognized named-value: 'matrix'. Located at position 115 within expression: github.event.inputs.platforms == 'all' || github.event.inputs.platforms == '' || github.event.inputs.platforms == matrix.os_type
on:
push:
tags:
- 'desktop-v*'
workflow_dispatch:
inputs:
draft:
description: 'Create as draft release'
required: false
default: true
type: boolean
platforms:
description: 'Platforms to build'
required: false
default: 'all'
type: choice
options:
- all
- windows
- macos
- linux
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Linux x86_64
- platform: ubuntu-22.04
target: x86_64-unknown-linux-gnu
args: ''
os_type: linux
# macOS Intel
- platform: macos-latest
target: x86_64-apple-darwin
args: '--target x86_64-apple-darwin'
os_type: macos
# macOS Apple Silicon
- platform: macos-latest
target: aarch64-apple-darwin
args: '--target aarch64-apple-darwin'
os_type: macos
# Windows x86_64
- platform: windows-latest
target: x86_64-pc-windows-msvc
args: ''
os_type: windows
runs-on: ${{ matrix.platform }}
if: >-
github.event.inputs.platforms == 'all' ||
github.event.inputs.platforms == '' ||
github.event.inputs.platforms == matrix.os_type
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: packages/desktop/src-tauri -> target
- name: Install canvas build dependencies (macOS)
if: matrix.platform == 'macos-latest'
run: |
brew install pkg-config cairo pango libpng jpeg giflib librsvg python-setuptools
- name: Install canvas build dependencies (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Install dependencies
run: pnpm install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_ENV_PLATFORM: ${{ matrix.target }}
with:
projectPath: packages/desktop
tauriScript: pnpm tauri
args: ${{ matrix.args }}
tagName: ${{ github.ref_name }}
releaseName: 'Grünerator Desktop ${{ github.ref_name }}'
releaseBody: |
See the [CHANGELOG](https://github.com/${{ github.repository }}/blob/main/packages/desktop/CHANGELOG.md) for details.
## Downloads
- **Windows**: `.msi` or `.exe` (NSIS installer)
- **macOS Intel**: `_x64.dmg`
- **macOS Apple Silicon**: `_aarch64.dmg`
- **Linux**: `.AppImage` or `.deb`
releaseDraft: ${{ github.event.inputs.draft || true }}
prerelease: false
# Generate update manifest after all builds complete
update-manifest:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/desktop-v')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download signature files from release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME#desktop-v}"
REPO="${{ github.repository }}"
mkdir -p signatures
# Download signature files (tauri-action creates these with .sig extension)
# Note: File naming follows Tauri v2 conventions
curl -sL -o signatures/linux.sig \
"https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/gruenerator_${VERSION}_amd64.AppImage.tar.gz.sig" || echo "" > signatures/linux.sig
curl -sL -o signatures/darwin-x64.sig \
"https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_x64.app.tar.gz.sig" || echo "" > signatures/darwin-x64.sig
curl -sL -o signatures/darwin-aarch64.sig \
"https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_aarch64.app.tar.gz.sig" || echo "" > signatures/darwin-aarch64.sig
curl -sL -o signatures/windows.sig \
"https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_x64-setup.nsis.zip.sig" || echo "" > signatures/windows.sig
- name: Generate latest.json for updater
run: |
VERSION="${GITHUB_REF_NAME#desktop-v}"
REPO="${{ github.repository }}"
# Read signatures (they're base64 encoded strings)
LINUX_SIG=$(cat signatures/linux.sig 2>/dev/null || echo "")
DARWIN_X64_SIG=$(cat signatures/darwin-x64.sig 2>/dev/null || echo "")
DARWIN_AARCH64_SIG=$(cat signatures/darwin-aarch64.sig 2>/dev/null || echo "")
WINDOWS_SIG=$(cat signatures/windows.sig 2>/dev/null || echo "")
cat > latest.json << EOF
{
"version": "${VERSION}",
"notes": "See release notes on GitHub",
"pub_date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"platforms": {
"linux-x86_64": {
"signature": "${LINUX_SIG}",
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/gruenerator_${VERSION}_amd64.AppImage.tar.gz"
},
"darwin-x86_64": {
"signature": "${DARWIN_X64_SIG}",
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_x64.app.tar.gz"
},
"darwin-aarch64": {
"signature": "${DARWIN_AARCH64_SIG}",
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_aarch64.app.tar.gz"
},
"windows-x86_64": {
"signature": "${WINDOWS_SIG}",
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/Gruenerator_${VERSION}_x64-setup.nsis.zip"
}
}
}
EOF
- name: Upload latest.json to release
uses: softprops/action-gh-release@v1
with:
files: latest.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}