Skip to content

Add files via upload #2

Add files via upload

Add files via upload #2

Workflow file for this run

name: Build ZPad Artifacts
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "src/**"
- "src-tauri/**"
- "package.json"
- "pnpm-lock.yaml"
- "vite.config.ts"
- ".github/workflows/build.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'push' }}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
COREPACK_ENABLE_AUTO_PIN: "0"
COREPACK_ENABLE_STRICT: "0"
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
build-windows:
name: Windows x64
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Set up Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Prepend Cargo bin to PATH
shell: pwsh
run: |
"$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Rust build cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
cache-on-failure: true
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build — NSIS + MSI
run: pnpm tauri build --bundles nsis,msi
- name: List bundle output
if: always()
shell: pwsh
run: |
Write-Host "=== NSIS ==="
Get-ChildItem -Recurse src-tauri\target\release\bundle\nsis -ErrorAction SilentlyContinue
Write-Host "=== MSI ==="
Get-ChildItem -Recurse src-tauri\target\release\bundle\msi -ErrorAction SilentlyContinue
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-x64
path: |
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/msi/*.msi
if-no-files-found: error
retention-days: 30
build-macos-intel:
name: macOS Intel x64
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Set up Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Prepend Cargo bin to PATH
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "CARGO=$HOME/.cargo/bin/cargo" >> $GITHUB_ENV
- name: Add x86_64-apple-darwin target
run: rustup target add x86_64-apple-darwin
- name: Rust build cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
cache-on-failure: true
key: macos-intel
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build — DMG (Intel x64)
run: pnpm tauri build --bundles dmg --target x86_64-apple-darwin
env:
APPLE_SIGNING_IDENTITY: "-"
CSC_IDENTITY_AUTO_DISCOVERY: "false"
- name: List bundle output
if: always()
run: |
find src-tauri/target/x86_64-apple-darwin/release/bundle -type f 2>/dev/null || echo "(not found)"
- name: Upload macOS Intel artifact
uses: actions/upload-artifact@v4
with:
name: macos-intel-x64
path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
if-no-files-found: error
retention-days: 30
build-macos-silicon:
name: macOS Apple Silicon
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Set up Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Prepend Cargo bin to PATH
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "CARGO=$HOME/.cargo/bin/cargo" >> $GITHUB_ENV
- name: Rust build cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
cache-on-failure: true
key: macos-silicon
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build — DMG (Apple Silicon)
run: pnpm tauri build --bundles dmg
env:
APPLE_SIGNING_IDENTITY: "-"
CSC_IDENTITY_AUTO_DISCOVERY: "false"
- name: List bundle output
if: always()
run: |
find src-tauri/target/release/bundle -type f 2>/dev/null || echo "(not found)"
- name: Upload macOS Apple Silicon artifact
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon
path: src-tauri/target/release/bundle/dmg/*.dmg
if-no-files-found: error
retention-days: 30
build-linux:
name: Linux x64
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libssl-dev \
libxdo-dev \
libfuse2 \
patchelf \
rpm \
libdbus-1-dev \
pkg-config
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Set up Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Prepend Cargo bin to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Rust build cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
cache-on-failure: true
key: linux-x64
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build — deb + AppImage + rpm
run: pnpm tauri build --bundles deb,appimage,rpm
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
- name: List bundle output
if: always()
run: |
find src-tauri/target/release/bundle -type f 2>/dev/null || echo "(not found)"
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-x64
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/rpm/*.rpm
if-no-files-found: error
retention-days: 30
collect:
name: Collect all release artifacts
needs: [build-windows, build-macos-intel, build-macos-silicon, build-linux]
runs-on: ubuntu-22.04
if: always() && !cancelled()
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Flatten into release/
run: |
mkdir -p release
find dist -type f \( \
-name '*.msi' -o \
-name '*.exe' -o \
-name '*.dmg' -o \
-name '*.deb' -o \
-name '*.rpm' -o \
-name '*.AppImage' \
\) -exec cp {} release/ \;
echo "=== release/ ==="
ls -lah release/
- name: Generate SHA-256 checksums
run: |
cd release
(sha256sum *.msi *.exe *.dmg *.deb *.rpm *.AppImage 2>/dev/null || true) > SHA256SUMS.txt
cat SHA256SUMS.txt
- name: Upload combined release bundle
uses: actions/upload-artifact@v4
with:
name: zpad-release-all
path: release/*
if-no-files-found: error
retention-days: 90