Add Gitea Action to build app for Linux and Windows
Triggers on pushes to app/ directory. Builds Tauri app on both platforms with Rust caching, uploads .AppImage/.deb/.rpm for Linux and .msi/.exe for Windows as artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
113
.gitea/workflows/build-app.yml
Normal file
113
.gitea/workflows/build-app.yml
Normal file
@@ -0,0 +1,113 @@
|
||||
name: Build App
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "app/**"
|
||||
- ".gitea/workflows/build-app.yml"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "app/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libgtk-3-dev \
|
||||
libwebkit2gtk-4.1-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev \
|
||||
libsoup-3.0-dev \
|
||||
libssl-dev \
|
||||
libxdo-dev \
|
||||
patchelf \
|
||||
pkg-config \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
file
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./app/src-tauri -> target"
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./app
|
||||
run: npm ci
|
||||
|
||||
- name: Install Tauri CLI
|
||||
working-directory: ./app
|
||||
run: npx tauri --version || npm install @tauri-apps/cli
|
||||
|
||||
- name: Build Tauri app
|
||||
working-directory: ./app
|
||||
run: npx tauri build
|
||||
|
||||
- name: Upload Linux artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: triple-c-linux
|
||||
path: |
|
||||
app/src-tauri/target/release/bundle/appimage/*.AppImage
|
||||
app/src-tauri/target/release/bundle/deb/*.deb
|
||||
app/src-tauri/target/release/bundle/rpm/*.rpm
|
||||
if-no-files-found: warn
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./app/src-tauri -> target"
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./app
|
||||
run: npm ci
|
||||
|
||||
- name: Install Tauri CLI
|
||||
working-directory: ./app
|
||||
run: npx tauri --version || npm install @tauri-apps/cli
|
||||
|
||||
- name: Build Tauri app
|
||||
working-directory: ./app
|
||||
run: npx tauri build
|
||||
|
||||
- name: Upload Windows artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: triple-c-windows
|
||||
path: |
|
||||
app/src-tauri/target/release/bundle/msi/*.msi
|
||||
app/src-tauri/target/release/bundle/nsis/*.exe
|
||||
if-no-files-found: warn
|
||||
Reference in New Issue
Block a user