Skip to content

Commit 17cf8a5

Browse files
committed
(debian) Make debian packaging workflow
Signed-off-by: Arisu Tachibana <arisu.tachibana@miraclelinux.com>
1 parent 8756568 commit 17cf8a5

File tree

3 files changed

+74
-5
lines changed

3 files changed

+74
-5
lines changed

.github/workflows/debian.yml

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