Skip to content

Commit 9d6b75b

Browse files
committed
feat(build): enhance release workflow with version determination and PPA installation
Signed-off-by: Vedran Hrabar <vedran.hrabar@outlook.com>
1 parent 658c248 commit 9d6b75b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/release-debs.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
sudo apt-get install -y --no-install-recommends \
5252
debhelper devscripts dpkg-dev build-essential fakeroot lintian \
5353
meson ninja-build pkg-config cmake gettext \
54+
distro-info-data libdistro-info-perl \
5455
python3 python3-pip python3-venv \
5556
libpam0g-dev libevdev-dev libinih-dev
5657
@@ -64,13 +65,18 @@ jobs:
6465
DEBEMAIL: "vedran.hrabar@outlook.com"
6566
DEBFULLNAME: "Vedran Hrabar"
6667
run: |
67-
base="$(dpkg-parsechangelog -S Version)"
68+
current="$(dpkg-parsechangelog -l debian/changelog -S Version)"
69+
base="$current"
6870
if [ "${{ github.event_name }}" = "release" ]; then
6971
tag="${{ github.ref_name }}"
7072
base="${tag#v}"
7173
fi
74+
if [ -z "$base" ]; then
75+
echo "::error::Could not determine package version (empty)."
76+
exit 1
77+
fi
7278
version="${base}${{ matrix.version_suffix }}"
73-
if [ "$version" != "$(dpkg-parsechangelog -S Version)" ]; then
79+
if [ "$version" != "$current" ]; then
7480
dch -b -v "$version" -D unstable -u low \
7581
"Automated CI build (${{ matrix.name }})"
7682
fi
@@ -121,8 +127,9 @@ jobs:
121127
docker run --rm -v "$PWD/dist:/debs:ro" ubuntu:26.04 bash -euc '
122128
export DEBIAN_FRONTEND=noninteractive
123129
apt-get update
124-
add-apt-repository ppa:vhrabar/tools
125-
# apt resolves the bundled .debs plus their archive dependencies.
130+
apt-get install -y --no-install-recommends software-properties-common
131+
add-apt-repository -y ppa:vhrabar/tools
132+
# apt resolves the bundled .debs plus their archive/PPA dependencies.
126133
apt-get install -y --no-install-recommends /debs/*.deb
127134
# Confirm the daemon package configured cleanly.
128135
dpkg -s secureeye-authd | grep -q "^Status: install ok installed"

0 commit comments

Comments
 (0)