-
Notifications
You must be signed in to change notification settings - Fork 74
73 lines (60 loc) · 2.11 KB
/
publish-deb-package.yml
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
73
name: Publish Debian Package
on:
release:
types: [published]
env:
QSV_KIND: prebuilt
jobs:
build-and-publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: x86_64-unknown-linux-gnu
override: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwayland-dev
cargo install cargo-deb
- name: Build all Debian packages
id: build
run: |
chmod +x scripts/build-deb.sh
echo "Running build-deb.sh..."
build_output=$(./scripts/build-deb.sh)
echo "Build script output:"
echo "$build_output"
# Extract paths from the output
deb_paths=$(echo "$build_output" | grep -oP '/[^ ]*\.deb' | tr '\n' ' ')
echo "Extracted .deb paths:"
echo "$deb_paths"
echo "DEB_PATHS=$deb_paths" >> $GITHUB_OUTPUT
- name: List built packages
run: |
echo "Built packages:"
ls -l ${{ steps.build.outputs.DEB_PATHS }}
- name: Rename and move Debian packages
run: |
mkdir -p renamed_debs
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $1}') renamed_debs/qsv.deb
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $2}') renamed_debs/qsvlite.deb
mv $(echo "${{ steps.build.outputs.DEB_PATHS }}" | awk '{print $3}') renamed_debs/qsvdp.deb
echo "Renamed packages:"
ls -l renamed_debs
- name: Upload Debian Packages as Artifacts
uses: actions/upload-artifact@v3
with:
name: debian-packages
path: renamed_debs/*.deb
- name: Upload Debian Packages as Artifacts
uses: actions/upload-artifact@v3
with:
name: debian-packages
path: |
/home/runner/work/qsv/qsv/target/debian/*.deb