Files
mediahive/.gitea/workflows/release.yaml
T
LeoVasanko 3ae4ce9f9f
release / gui-build (windows) (push) Failing after 0s
release / gui-build (macos) (push) Successful in 1m12s
release / gui-build (linux) (push) Successful in 1m15s
Fix Windows checkout (powershell, not WSL bash) and install node per-job via uv
2026-09-22 04:23:48 +00:00

66 lines
2.1 KiB
YAML

name: release
on:
push:
tags:
- "v*"
jobs:
gui-build:
strategy:
fail-fast: false
matrix:
os: [macos, windows, linux]
runs-on: ${{ matrix.os }}
steps:
# Plain git clone instead of actions/checkout (a JS action that would
# require node on the host). Full history so setuptools_scm sees tags.
# ${{ }} expressions are substituted by the runner, so both shells work.
- name: Checkout
if: matrix.os != 'windows'
shell: bash
run: |
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
git checkout -f "${{ gitea.sha }}"
- name: Checkout (Windows)
if: matrix.os == 'windows'
shell: powershell
run: |
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
git checkout -f "${{ gitea.sha }}"
# The sdist build compiles the Vue frontend and needs node/npm.
# Install per-job via uv so runner hosts don't need node set up.
- name: Install Node.js
if: matrix.os != 'windows'
shell: bash
run: |
uv tool install nodejs-wheel
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install Node.js (Windows)
if: matrix.os == 'windows'
shell: powershell
run: |
uv tool install nodejs-wheel
Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.local\bin"
- name: Build GUI app zip and dist packages
run: uv run --extra gui scripts/guibuild.py
# Every platform converges on the one release for the tag; release.py
# reuses an existing release and skips already-uploaded assets.
# Only the linux job publishes the wheel/sdist (identical across platforms).
- name: Create Gitea release and upload assets
if: matrix.os == 'linux'
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: uv run scripts/release.py
- name: Attach platform artifact to the Gitea release
if: matrix.os != 'linux'
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: uv run scripts/release.py --no-dist