-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (61 loc) · 1.91 KB
/
debian.yml
File metadata and controls
70 lines (61 loc) · 1.91 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
name: Make Debian Package
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build-dsc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
debhelper \
devscripts \
dh-python \
dh-sequence-python3 \
pybuild-plugin-pyproject \
fakeroot \
python3-all \
python3-poetry-core
- name: Create upstream tarball
run: |
DEB_VERSION=$(dpkg-parsechangelog -SVersion)
UPSTREAM_VERSION=${DEB_VERSION%%-*}
git archive --format=tar.gz \
--output=../kci-dev_${UPSTREAM_VERSION}.orig.tar.gz \
--prefix=kci-dev-${UPSTREAM_VERSION}/ \
HEAD
- name: Build Debian package
run: debuild -S -us -uc --lintian-opts --profile debian
- name: Collect Debian artifacts for development
run: |
mkdir -p artifacts
shopt -s nullglob
for file in ../kci-dev_*; do
mv "$file" artifacts/
done
- name: Upload Debian artifacts for development
uses: actions/upload-artifact@v4
with:
name: kci-dev-debian-source
path: artifacts/
- name: Upload Debian source to GitHub Release on new tag
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
files: |
artifacts/kci-dev_*.dsc
artifacts/kci-dev_*.orig.tar.*
artifacts/kci-dev_*debian.tar.*
artifacts/kci-dev_*_source.buildinfo
artifacts/kci-dev_*_source.changes