-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 2.27 KB
/
release.yml
File metadata and controls
72 lines (59 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 libcairo2-dev libglib2.0-dev libpango1.0-dev
- 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.lock', 'rs/Cargo.toml', 'rs/**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build Rust workspace
run: cargo build --release --locked --manifest-path rs/Cargo.toml
- name: Build overlay daemon
run: cargo build --release --locked --manifest-path rs/Cargo.toml -p flashpaste-overlayd --features wayland
- name: Build .deb
run: VERSION=${{ steps.ver.outputs.v }} bash packaging/build-deb.sh
- name: Package smoke test
run: bash packaging/package-smoke.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 \
dist/flashpaste_all.deb \
--title "flashpaste ${GITHUB_REF_NAME}" \
--generate-notes