Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"servers": {
"xe-launcher-v2": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sse", "http://localhost:3464/sse"]
"args": ["-y", "@modelcontextprotocol/server-sse", "http://localhost:3466/sse"]
}
}
}
105 changes: 105 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run frontend tests
run: bun test
continue-on-error: true

build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install frontend dependencies
run: bun install

- name: Build frontend
run: bun run build

- name: Build Tauri app (no bundle)
run: |
cd apps/desktop
bun tauri build --no-bundle

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}
path: |
apps/desktop/src-tauri/target/release/xe-launcher
apps/desktop/src-tauri/target/release/xe-launcher.exe
apps/desktop/src-tauri/target/release/bundle/

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Install dependencies
run: bun install

- name: Check Rust formatting
run: |
cd apps/desktop/src-tauri
cargo fmt -- --check

- name: Run Clippy
run: |
cd apps/desktop/src-tauri
cargo clippy -- -D warnings
continue-on-error: true
166 changes: 166 additions & 0 deletions .github/workflows/release-selfhosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: Self-Hosted Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 1.0.0-beta.1)'
required: true
type: string

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:
create-release:
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create-release.outputs.id }}
release_upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- uses: actions/checkout@v4

- name: Create tag
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git tag -a "v${{ inputs.version }}" -m "Release v${{ inputs.version }}"
git push origin "v${{ inputs.version }}"

- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ inputs.version }}
release_name: XE Launcher v${{ inputs.version }}
draft: true
prerelease: ${{ contains(inputs.version, 'beta') || contains(inputs.version, 'alpha') }}
body: |
## What's New

<!-- Add release notes here -->

## Installation

### macOS
- **Intel**: Download `XE-Launcher_x64.dmg`
- **Apple Silicon**: Download `XE-Launcher_aarch64.dmg`

### Windows
- Download `XE-Launcher_x64_en-US.msi`

### Linux
- **AppImage**: Download `xe-launcher_amd64.AppImage`
- **Debian/Ubuntu**: Download `xe-launcher_amd64.deb`
- **Red Hat/Fedora**: Download `xe-launcher.x86_64.rpm`

## Auto-Update

This release supports auto-updates. Once installed, the app will automatically check for and install future updates.

build-tauri:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
rust_target: 'x86_64-apple-darwin'
- platform: 'macos-latest'
rust_target: 'aarch64-apple-darwin'
- platform: 'ubuntu-22.04'
rust_target: 'x86_64-unknown-linux-gnu'
- platform: 'windows-latest'
rust_target: 'x86_64-pc-windows-msvc'

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust_target }}

- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install frontend dependencies
run: bun install

- name: Setup Apple certificate
if: matrix.platform == 'macos-latest'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$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:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain

- name: Update version in tauri.conf.json
run: |
cd apps/desktop/src-tauri
jq '.version = "${{ inputs.version }}"' tauri.conf.json > tauri.conf.tmp.json
mv tauri.conf.tmp.json tauri.conf.json

- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
projectPath: apps/desktop
args: --target ${{ matrix.rust_target }}
releaseId: ${{ needs.create-release.outputs.release_id }}

publish-release:
runs-on: ubuntu-latest
needs: [create-release, build-tauri]
steps:
- name: Publish release
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ needs.create-release.outputs.release_id }},
draft: false
})

create-update-manifest:
runs-on: ubuntu-latest
needs: [publish-release]
steps:
- uses: actions/checkout@v4

- name: Generate update manifest
run: |
# This will be called by the update-manifest workflow
echo "Update manifest will be generated by separate workflow"
Loading