rufeed/.github/workflows/build.yml
2026-05-04 21:10:16 +02:00

77 lines
No EOL
2.4 KiB
YAML

name: Build Tag (Linux + Windows)
on:
workflow_dispatch:
inputs:
tag:
description: "Git tag to build (example: v0.4.0)"
required: true
type: string
permissions:
contents: write
jobs:
build:
name: Build on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout selected tag
uses: actions/checkout@v4
with:
ref: refs/tags/${{ inputs.tag }}
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build app
run: pnpm tauri build
- name: Upload build artifacts (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: bundles-${{ matrix.os }}-${{ inputs.tag }}
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/rpm/*.rpm
src-tauri/target/release/bundle/appimage/*.AppImage
if-no-files-found: error
- name: Upload build artifacts (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: bundles-${{ matrix.os }}-${{ inputs.tag }}
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
if-no-files-found: error
release:
name: Upload assets to tag release
runs-on: ubuntu-22.04
needs: build
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
pattern: bundles-*
path: release-assets
merge-multiple: true
- name: Upload assets to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
files: release-assets/**/*