Skip to content

Release

Release #14

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-deb:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y dpkg-dev lintian libwayland-dev libx11-dev libdbus-1-dev pkg-config
- name: Resolve version from tag
id: ver
run: echo "v=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
# Build the Rust workspace (tier 2 + 3 binaries) so the .deb includes
# flashpaste-dispatch, flashpasted, flashpaste-trigger, flashpaste-shoot.
# packaging/build-deb.sh detects rs/target/release/ and packages
# whatever's built. Skipping this step yields a bash-only .deb.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry + target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rs/target
key: ${{ runner.os }}-cargo-${{ hashFiles('rs/Cargo.toml', 'rs/**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build Rust workspace
run: cargo build --release --manifest-path rs/Cargo.toml
- name: Build .deb
run: VERSION=${{ steps.ver.outputs.v }} bash packaging/build-deb.sh
- name: Show package info
run: |
ls -la dist/
dpkg-deb -I dist/flashpaste_${{ steps.ver.outputs.v }}_all.deb
dpkg-deb -c dist/flashpaste_${{ steps.ver.outputs.v }}_all.deb | head -40
- name: Upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${GITHUB_REF_NAME}" \
dist/flashpaste_${{ steps.ver.outputs.v }}_all.deb \
--title "flashpaste ${GITHUB_REF_NAME}" \
--generate-notes