79 lines
1.9 KiB
YAML
79 lines
1.9 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
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bundles-${{ matrix.os }}-${{ inputs.tag }}
|
|
path: src-tauri/target/release/bundle/**
|
|
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/**/*
|