catacomb/.forgejo/workflows/release.yml
Luna 3f611849af docs: rename yt-offline → Catacomb across README, ROADMAP, guides, packaging
Prose + commands updated to the new name: brand reads "Catacomb", while
binary/path/package references are the lowercase `catacomb` (commands, deb/rpm
names, ~/.local/share/catacomb, catacomb.db, catacomb.desktop). Codeberg repo
URLs left pointing at the existing repo. Also folds in the pending doc edits
from earlier in the session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 03:34:18 -07:00

93 lines
3.4 KiB
YAML

# Build Linux packages and attach them to the Codeberg release when a
# version tag (v*) is pushed.
#
# Codeberg runs Forgejo Actions, which is GitHub-Actions-compatible. The
# heavy lifting is in scripts/package.sh — this workflow just provisions
# a build environment, runs it, and uploads the artifacts.
#
# Manual trigger (workflow_dispatch) is included so you can smoke-test the
# build without cutting a tag; that path builds the packages but skips the
# release-upload step.
name: release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
packages:
runs-on: docker
# A Debian-based image gives us dpkg + the build toolchain cargo-deb
# expects, and rustup for a pinned toolchain.
container:
image: rust:1.85-bookworm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install build dependencies
# libxcb + friends are needed to *link* the eframe/winit GUI even
# in headless CI. curl + file are used by the packaging script and
# appimagetool. rpm provides rpmbuild for cargo-generate-rpm's
# payload assembly on a Debian host. mingw-w64 + zip let the same
# script cross-compile the Windows .zip from this Linux container.
run: |
apt-get update
apt-get install -y --no-install-recommends \
libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
curl file rpm ca-certificates mingw-w64 zip
- name: Add Windows cross-compile target
# package.sh's `all` only builds the Windows zip when this target +
# mingw + zip are all present (win_available), so this step is what
# opts the release build into producing catacomb-*-x86_64-windows.zip.
run: rustup target add x86_64-pc-windows-gnu
- name: Cache cargo registry + build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
- name: Build packages
# FUSE isn't available in most CI containers, so tell appimagetool
# to extract-and-run instead of mounting. The script downloads
# appimagetool itself.
env:
APPIMAGE_EXTRACT_AND_RUN: '1'
run: |
chmod +x scripts/package.sh
scripts/package.sh all
- name: List artifacts
run: ls -la dist/
- name: Upload to release
# Only attaches to a release when triggered by a tag push. The
# forgejo-release action creates the release if it doesn't exist
# and uploads every file under dist/.
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/forgejo-release@v2
with:
direction: upload
url: https://codeberg.org
repo: ${{ github.repository }}
tag: ${{ github.ref_name }}
token: ${{ secrets.RELEASE_TOKEN }}
release-dir: dist
release-notes: |
Automated build for ${{ github.ref_name }}.
Artifacts:
- `.deb` — Debian / Ubuntu / Mint
- `.rpm` — Fedora / RHEL / openSUSE
- `.AppImage` — any Linux (chmod +x and run)
- `-x86_64-windows.zip` — Windows 10/11 (unzip, run catacomb.exe)
Runtime requirements: yt-dlp, ffmpeg, mpv on PATH (plus
xdg-utils on Linux). The Windows zip's README lists the same.