forked from mdev588/vboard
-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (45 loc) · 1.47 KB
/
Copy pathbuild-deb.yml
File metadata and controls
54 lines (45 loc) · 1.47 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
name: Build Debian Package
'on':
pull_request:
release:
types:
- published
workflow_dispatch:
permissions:
contents: write
jobs:
build-deb:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install packaging dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
dpkg-dev \
devscripts \
equivs \
fakeroot \
build-essential
# Install Build-Depends from debian/control to keep CI aligned with packaging metadata.
sudo mk-build-deps --install --remove --tool 'apt-get -y --no-install-recommends' debian/control
- name: Build Debian package
run: dpkg-buildpackage -us -uc -b
- name: Collect Debian artifacts
run: |
mkdir -p artifacts
cp -v ../*.deb ../*.buildinfo ../*.changes artifacts/
- name: Upload Debian artifacts
uses: actions/upload-artifact@v7
with:
name: vboard-deb-${{ github.sha }}
path: |
artifacts/*.deb
if-no-files-found: error
- name: Upload Debian package to GitHub release
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$RELEASE_TAG" artifacts/*.deb artifacts/*.buildinfo artifacts/*.changes --clobber