Skip to content

feat: implement GUI lock mechanism and enhance about section with emb… #42

feat: implement GUI lock mechanism and enhance about section with emb…

feat: implement GUI lock mechanism and enhance about section with emb… #42

Workflow file for this run

name: Build And Release Debian Package
on:
push:
tags: ["v*"]
jobs:
build-deb:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libhidapi-dev libudev-dev libgtk-4-dev libadwaita-1-dev
- name: Resolve Version
id: version
run: |
set -euo pipefail
cargo_version="$(sed -nE 's/^version = "([^"]+)"/\1/p' Cargo.toml | head -n1)"
if [[ "${GITHUB_REF:-}" == refs/tags/v* ]]; then
tag_version="${GITHUB_REF#refs/tags/v}"
if [[ "${tag_version}" != "${cargo_version}" ]]; then
echo "Tag version (${tag_version}) does not match Cargo.toml (${cargo_version})" >&2
exit 1
fi
fi
echo "value=${cargo_version}" >> "${GITHUB_OUTPUT}"
- name: Run Tests
run: cargo test --locked
- name: Build Release Binaries
run: cargo build --release --locked --bin streamrs --bin streamrs-preview --bin streamrs-gui --bin streamrs-icon-compose
- name: Build Debian Package
run: bash scripts/build-deb.sh "${{ steps.version.outputs.value }}" dist
- name: Upload Debian Artifact
uses: actions/upload-artifact@v4
with:
name: streamrs-deb-${{ steps.version.outputs.value }}
path: dist/*.deb
if-no-files-found: error
publish-release:
runs-on: ubuntu-latest
needs: build-deb
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download Debian Artifact
uses: actions/download-artifact@v4
with:
name: streamrs-deb-${{ needs.build-deb.outputs.version }}
path: dist
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*.deb
generate_release_notes: true