scythe/.github/workflows/release.yml

190 lines
6.9 KiB
YAML

name: Release & Packaging
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-linux:
name: Build Linux Packages (.tar.gz, .deb, .rpm, .AppImage)
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
pkg-config clang libva-dev \
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
libavfilter-dev libavdevice-dev \
libpipewire-0.3-dev libgtk-3-dev libgtk-layer-shell-dev libxcb1-dev libasound2-dev \
rpm alien wget
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build Release Binaries
run: cargo build --release
- name: Package Linux Tarball (Generic Binaries)
run: |
mkdir -p dist/vrec-linux-x86_64
cp target/release/vrec-daemon target/release/vrec-ui dist/vrec-linux-x86_64/
cp packaging/vrec.desktop dist/vrec-linux-x86_64/
tar -czvf dist/vrec-linux-x86_64.tar.gz -C dist vrec-linux-x86_64
- name: Build Debian Package (.deb)
run: |
mkdir -p deb/vrec_0.1.0/DEBIAN deb/vrec_0.1.0/usr/bin deb/vrec_0.1.0/usr/share/applications
cat > deb/vrec_0.1.0/DEBIAN/control << 'EOF'
Package: vrec
Version: 0.1.0
Section: video
Priority: optional
Architecture: amd64
Maintainer: oiupoyt
Description: High-performance GPU hardware screen recorder and instant replay overlay
Depends: libgtk-3-0, libgtk-layer-shell0, libpipewire-0.3-0, libva2, libasound2
EOF
cp target/release/vrec-daemon deb/vrec_0.1.0/usr/bin/
cp target/release/vrec-ui deb/vrec_0.1.0/usr/bin/
cp packaging/vrec.desktop deb/vrec_0.1.0/usr/share/applications/
dpkg-deb --build deb/vrec_0.1.0 dist/vrec_0.1.0_amd64.deb
- name: Build RPM Package (.rpm)
run: |
alien --to-rpm --scripts dist/vrec_0.1.0_amd64.deb
mv *.rpm dist/
- name: Package Standalone AppImage
run: |
mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/scalable/apps
cp target/release/vrec-ui AppDir/usr/bin/
cp target/release/vrec-daemon AppDir/usr/bin/
cp packaging/vrec.desktop AppDir/usr/share/applications/
cat > AppDir/AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
exec "${HERE}/usr/bin/vrec-ui" "$@"
EOF
chmod +x AppDir/AppRun
touch AppDir/usr/share/icons/hicolor/scalable/apps/media-record.svg
touch AppDir/media-record.svg
ln -s usr/share/applications/vrec.desktop AppDir/vrec.desktop
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
./appimagetool --appimage-extract-and-run AppDir dist/vrec-x86_64.AppImage || true
- name: Upload Linux Artifacts
uses: actions/upload-artifact@v4
with:
name: linux-packages
path: dist/*
build-windows:
name: Build Windows Binaries (.exe)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
path-type: minimal
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-rust
mingw-w64-x86_64-gtk3
mingw-w64-x86_64-ffmpeg
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-clang
mingw-w64-x86_64-ntldd
python3
- name: Build Release Binaries (Windows)
shell: msys2 {0}
env:
LIBCLANG_PATH: /mingw64/bin
BINDGEN_EXTRA_CLANG_ARGS: "--target=x86_64-w64-windows-gnu"
run: |
cargo build --release
mkdir -p dist/bundle
cp target/release/vrec-daemon.exe dist/bundle/
cp target/release/vrec-ui.exe dist/bundle/
python3 packaging/windows/bundle_deps.py dist/bundle
- name: Package Windows Standalone (.exe), Installer, and Zip
shell: pwsh
run: |
if (!(Get-Command makensis -ErrorAction SilentlyContinue)) {
if (Test-Path "C:\Program Files (x86)\NSIS\makensis.exe") {
$env:Path += ";C:\Program Files (x86)\NSIS"
} else {
choco install nsis -y --no-progress
$env:Path += ";C:\Program Files (x86)\NSIS"
}
}
makensis packaging/windows/vrec-installer.nsi
- name: Upload Windows Artifacts
uses: actions/upload-artifact@v4
with:
name: windows-packages
path: dist/vrec-setup.exe
publish-release:
name: Publish GitHub Release
needs: [build-linux, build-windows]
if: always() && !cancelled() && (needs.build-linux.result == 'success' || needs.build-windows.result == 'success')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download all built artifacts
uses: actions/download-artifact@v4
continue-on-error: true
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name != 'main' && github.ref_name || 'v0.1.0' }}
name: "vrec ${{ github.ref_name != 'main' && github.ref_name || 'v0.1.0' }}"
body: |
High-performance GPU hardware screen recorder and instant replay overlay for Linux and Windows.
### Highlights
- Zero-copy GPU screen capture (PipeWire/DMA-BUF on Wayland, XCB on X11, D3D11 on Windows)
- Low-overhead rolling ring buffer for instant replays
- Hardware encoding via VAAPI (AMD/Intel) and NVENC (NVIDIA)
- Stealth floating HUD dock built in egui
- Dynamic Hyprland keybinding and window rule injection
- Multi-channel audio routing (System audio, Microphone, Combined, and Mute)
### Packages
- Windows: `vrec-setup.exe` (Official installer with Start Menu & Desktop shortcuts)
- Universal Linux: `vrec-x86_64.AppImage`
- Debian / Ubuntu / Mint: `vrec_0.1.0_amd64.deb`
- Fedora / RHEL / openSUSE: `vrec-0.1.0-2.x86_64.rpm`
- Generic Linux: `vrec-linux-x86_64.tar.gz`
files: |
artifacts/linux-packages/*
artifacts/windows-packages/*
draft: false
prerelease: false
generate_release_notes: false