Files
Kingdom-Cheat-Deliverance-2/.github/workflows/build.yml
T
Homer 8a2421597e
Build / build (, ubuntu-22.04) (push) Failing after 1m0s
Build / build (, windows-latest) (push) Has been cancelled
Build / release (push) Has been cancelled
Add CI build workflow and README
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 09:20:44 +02:00

70 lines
1.7 KiB
YAML

name: Build
on:
push:
branches: [main]
tags: ["v*"]
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-22.04
args: ""
- platform: windows-latest
args: ""
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install Linux dependencies
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev \
libayatana-appindicator3-dev librsvg2-dev patchelf
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
- run: npm ci
- name: Build bundles
run: npm run tauri build -- ${{ matrix.args }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: kcd2-overlay-${{ matrix.platform }}
path: |
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
if-no-files-found: warn
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*