Skip to content

Merge pull request #110 from jessielw/dev #18

Merge pull request #110 from jessielw/dev

Merge pull request #110 from jessielw/dev #18

Workflow file for this run

name: Desktop Build
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
inputs:
tag:
description: "Release tag to attach artifacts to (e.g. 0.1.0-beta1)"
required: true
type: string
concurrency:
group: desktop-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
artifact_name: reclaimerr-windows-x64.zip
exe_path: dist/reclaimerr
- os: macos-latest
artifact_name: reclaimerr-macos-x64.zip
exe_path: dist/reclaimerr
- os: ubuntu-latest
artifact_name: reclaimerr-linux-x64.zip
exe_path: dist/reclaimerr
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
working-directory: frontend
run: npm install
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install Python dependencies
run: uv sync --extra desktop
- name: Build desktop app
run: uv run python scripts/build_desktop.py
- name: Archive build (Windows)
if: runner.os == 'Windows'
run: Compress-Archive -Path "${{ matrix.exe_path }}/*" -DestinationPath "${{ matrix.artifact_name }}"
shell: pwsh
- name: Archive build (macOS/Linux)
if: runner.os != 'Windows'
run: zip -r "${{ matrix.artifact_name }}" "${{ matrix.exe_path }}/"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}
retention-days: 7
release:
name: Attach to release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: artifacts/*
fail_on_unmatched_files: true