Skip to content

Commit a52529f

Browse files
committed
(debian) Make debian packaging workflow
Signed-off-by: Arisu Tachibana <[email protected]>
1 parent 8756568 commit a52529f

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed

.github/workflows/debian.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Make Debian Package
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-dsc:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Install build dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y \
19+
build-essential \
20+
debhelper \
21+
devscripts \
22+
dh-python \
23+
dh-sequence-python3 \
24+
pybuild-plugin-pyproject \
25+
fakeroot \
26+
python3-all \
27+
python3-poetry-core
28+
29+
- name: Create upstream tarball
30+
run: |
31+
DEB_VERSION=$(dpkg-parsechangelog -SVersion)
32+
UPSTREAM_VERSION=${DEB_VERSION%%-*}
33+
git archive --format=tar.gz \
34+
--output=../kci-dev_${UPSTREAM_VERSION}.orig.tar.gz \
35+
--prefix=kci-dev-${UPSTREAM_VERSION}/ \
36+
HEAD
37+
38+
- name: Build Debian package
39+
run: debuild -S -us -uc --lintian-opts --profile debian
40+
41+
- name: Collect Debian artifacts for development
42+
run: |
43+
mkdir -p artifacts
44+
shopt -s nullglob
45+
for file in ../kci-dev_*; do
46+
mv "$file" artifacts/
47+
done
48+
49+
- name: Upload Debian artifacts for development
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: kci-dev-debian-source
53+
path: artifacts/
54+
55+
- name: Upload Debian source to GitHub Release on new tag
56+
if: startsWith(github.ref, 'refs/tags/')
57+
uses: softprops/action-gh-release@v2
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
tag_name: ${{ github.ref_name }}
62+
files: |
63+
../kci-dev_*.dsc
64+
../kci-dev_*.orig.tar.*
65+
../kci-dev_*debian.tar.*
66+
../kci-dev_*_source.buildinfo
67+
../kci-dev_*_source.changes

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
kci-dev (0.1.8-1) UNRELEASED; urgency=medium
1+
kci-dev (0.1.8-1) unstable; urgency=medium
22

33
* Initial packaging.
44

5-
-- Arisu Tachibana <[email protected]> Fri, 10 Oct 2025 21:00:00 +0900
5+
-- Arisu Tachibana <[email protected]> Fri, 04 Dec 2025 21:00:00 +0900
66

debian/kci-dev-completions.install

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# move completions files under share
2-
kci-dev/completions/kci-dev-completion.bash usr/share/bash-completion/completions/kci-dev
3-
kci-dev/completions/_kci-dev usr/share/zsh/vendor-completions/_kci-dev
4-
kci-dev/completions/kci-dev.fish usr/share/fish/vendor_completions.d/kci-dev.fish
2+
completions/kci-dev-completion.bash usr/share/bash-completion/completions/kci-dev
3+
completions/_kci-dev usr/share/zsh/vendor-completions/_kci-dev
4+
completions/kci-dev.fish usr/share/fish/vendor_completions.d/kci-dev.fish

0 commit comments

Comments
 (0)