diff --git a/.github/workflows/release-stable.yml b/.github/workflows/release-stable.yml index bc9cea4c..cb8ea7cd 100644 --- a/.github/workflows/release-stable.yml +++ b/.github/workflows/release-stable.yml @@ -50,7 +50,7 @@ jobs: echo "### Stable version: \`$DISPLAY_VERSION\`" >> "$GITHUB_STEP_SUMMARY" # ───────────────────────────────────────────────────────────── - # Phase 2: Build each architecture in parallel + # Phase 2: Build release bundles in parallel # ───────────────────────────────────────────────────────────── build: name: Build (${{ matrix.arch }}) @@ -249,12 +249,99 @@ jobs: src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app.tar.gz.sig retention-days: 1 + build-linux: + name: Build (linux-x86_64) + needs: version + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install Tauri Linux system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + libsoup-3.0-dev \ + libxdo-dev \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + curl \ + wget \ + patchelf \ + build-essential \ + file + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-unknown-linux-gnu + + - name: Cache Rust dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + src-tauri/target + key: ${{ runner.os }}-release-cargo-x86_64-unknown-linux-gnu-${{ env.RUST_TARGET_CACHE_VERSION }}-${{ hashFiles('src-tauri/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-release-cargo-x86_64-unknown-linux-gnu-${{ env.RUST_TARGET_CACHE_VERSION }}- + + - name: Install frontend dependencies + run: pnpm install --frozen-lockfile + + - name: Clear cached bundle artifacts + run: | + rm -rf src-tauri/target/x86_64-unknown-linux-gnu/release/bundle + + - name: Set version + run: | + VERSION="${{ needs.version.outputs.version }}" + jq --arg v "$VERSION" '.version = $v' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json + sed -i "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml + + - name: Build Tauri app (Linux bundles) + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + VITE_POSTHOG_KEY: ${{ secrets.VITE_POSTHOG_KEY }} + VITE_POSTHOG_HOST: ${{ secrets.VITE_POSTHOG_HOST }} + run: | + pnpm tauri build --target x86_64-unknown-linux-gnu --bundles deb,appimage + + - name: Upload Linux bundles + uses: actions/upload-artifact@v4 + with: + name: linux-x86_64-bundles + path: | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz.sig + if-no-files-found: error + retention-days: 1 + # ───────────────────────────────────────────────────────────── # Phase 3: Publish GitHub Release # ───────────────────────────────────────────────────────────── release: name: GitHub Release (stable) - needs: [version, build] + needs: [version, build, build-linux] runs-on: ubuntu-latest permissions: contents: write @@ -282,7 +369,7 @@ jobs: echo "---" echo "**Stable release — manually promoted from \`main\`**" echo "" - echo "**Requires Apple Silicon (M1/M2/M3)**" + echo "**macOS requires Apple Silicon (M1/M2/M3). Linux packages target x86_64.**" echo "" echo "*Built from \`$(git rev-parse --short ${{ needs.version.outputs.tag }})\` on $(date -u +%Y-%m-%d)*" } > release_notes.md @@ -298,6 +385,10 @@ jobs: ARM_SIG=$(cat updater-aarch64/*.app.tar.gz.sig) ARM_TARBALL=$(ls updater-aarch64/*.app.tar.gz | xargs basename) ARM_DMG=$(ls dmg-aarch64/*.dmg | xargs basename) + LINUX_SIG=$(cat linux-x86_64-bundles/*.AppImage.tar.gz.sig) + LINUX_TARBALL=$(ls linux-x86_64-bundles/*.AppImage.tar.gz | xargs basename) + LINUX_APPIMAGE=$(ls linux-x86_64-bundles/*.AppImage | xargs basename) + LINUX_DEB=$(ls linux-x86_64-bundles/*.deb | xargs basename) cat > stable-latest.json << EOF { @@ -309,6 +400,12 @@ jobs: "signature": "${ARM_SIG}", "url": "https://github.com/${REPO}/releases/download/${TAG}/${ARM_TARBALL}", "dmg_url": "https://github.com/${REPO}/releases/download/${TAG}/${ARM_DMG}" + }, + "linux-x86_64": { + "signature": "${LINUX_SIG}", + "url": "https://github.com/${REPO}/releases/download/${TAG}/${LINUX_TARBALL}", + "appimage_url": "https://github.com/${REPO}/releases/download/${TAG}/${LINUX_APPIMAGE}", + "deb_url": "https://github.com/${REPO}/releases/download/${TAG}/${LINUX_DEB}" } } } @@ -327,6 +424,10 @@ jobs: dmg-aarch64/*.dmg updater-aarch64/*.app.tar.gz updater-aarch64/*.app.tar.gz.sig + linux-x86_64-bundles/*.deb + linux-x86_64-bundles/*.AppImage + linux-x86_64-bundles/*.AppImage.tar.gz + linux-x86_64-bundles/*.AppImage.tar.gz.sig stable-latest.json # ───────────────────────────────────────────────────────────── diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91bd0096..c907a642 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -303,86 +303,6 @@ jobs: src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app.tar.gz.sig retention-days: 1 - build-linux: - name: Build (linux-x86_64) - needs: version - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Install Tauri Linux system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - libwebkit2gtk-4.1-dev \ - libsoup-3.0-dev \ - libxdo-dev \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev \ - patchelf \ - build-essential \ - file - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'pnpm' - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - targets: x86_64-unknown-linux-gnu - - - name: Cache Rust dependencies - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - src-tauri/target - key: ${{ runner.os }}-release-cargo-x86_64-unknown-linux-gnu-${{ env.RUST_TARGET_CACHE_VERSION }}-${{ hashFiles('src-tauri/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-release-cargo-x86_64-unknown-linux-gnu-${{ env.RUST_TARGET_CACHE_VERSION }}- - - - name: Install frontend dependencies - run: pnpm install --frozen-lockfile - - - name: Set version - run: | - VERSION="${{ needs.version.outputs.version }}" - jq --arg v "$VERSION" '.version = $v' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json - sed -i "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml - - - name: Build Tauri app (Linux bundles) - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - VITE_POSTHOG_KEY: ${{ secrets.VITE_POSTHOG_KEY }} - VITE_POSTHOG_HOST: ${{ secrets.VITE_POSTHOG_HOST }} - run: | - pnpm tauri build --target x86_64-unknown-linux-gnu --bundles deb,appimage - - - name: Upload Linux bundles - uses: actions/upload-artifact@v4 - with: - name: linux-x86_64-bundles - path: | - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz - src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz.sig - retention-days: 7 - # ───────────────────────────────────────────────────────────── # Phase 3: Publish GitHub Release # No lipo/re-signing — use the per-arch artifacts directly diff --git a/docs/ABSTRACTIONS.md b/docs/ABSTRACTIONS.md index 9f2f5664..92659c2c 100644 --- a/docs/ABSTRACTIONS.md +++ b/docs/ABSTRACTIONS.md @@ -692,5 +692,5 @@ Managed by `useSettings` hook and `SettingsPanel` component. `default_ai_agent` ### CI/CD - **`.github/workflows/release.yml`** — Alpha prereleases from every push to `main` using calendar-semver technical versions (`YYYY.M.D-alpha.N`) and clean `Alpha YYYY.M.D.N` release names. GitHub alpha tags zero-pad the prerelease sequence (`alpha-vYYYY.M.D-alpha.NNNN`) so GitHub release ordering stays chronological while the shipped app version remains `YYYY.M.D-alpha.N`. Publishes `alpha/latest.json` and refreshes the legacy `latest.json` / `latest-canary.json` aliases to the alpha feed. -- **`.github/workflows/release-stable.yml`** — Stable releases from `stable-vYYYY.M.D` tags. Publishes `stable/latest.json`. +- **`.github/workflows/release-stable.yml`** — Stable releases from `stable-vYYYY.M.D` tags. Publishes `stable/latest.json`, macOS Apple Silicon artifacts, and Linux x86_64 `.deb` / AppImage artifacts. - **Beta cohorts** are handled in PostHog targeting only. There is no beta updater feed. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0cf50a0e..d31f5efb 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -806,9 +806,6 @@ push to main → build job: → pnpm install, stamp version, pnpm build, tauri build --target aarch64-apple-darwin --bundles app → upload signed .app.tar.gz + .sig updater artifacts - → build-linux job: - → pnpm install, stamp version, tauri build --target x86_64-unknown-linux-gnu --bundles deb,appimage - → upload .deb, .AppImage, and signed updater tarball artifacts for manual download → release job: → generate alpha-latest.json → publish GitHub prerelease alpha-vYYYY.M.D-alpha.NNNN named Tolaria Alpha YYYY.M.D.N @@ -828,8 +825,11 @@ push stable-vYYYY.M.D tag → build job: → pnpm install, stamp version, pnpm build, tauri build --target aarch64-apple-darwin → upload signed .app.tar.gz + .sig and .dmg artifacts + → build-linux job: + → pnpm install, stamp version, tauri build --target x86_64-unknown-linux-gnu --bundles deb,appimage + → upload .deb, .AppImage, and signed AppImage updater tarball artifacts → release job: - → generate stable-latest.json with both updater tarball and current stable DMG URLs + → generate stable-latest.json with macOS and Linux updater URLs plus manual download URLs → publish GitHub release Tolaria YYYY.M.D → pages job: → publish stable/latest.json