Skip to content

Commit 1ba361f

Browse files
committed
Update build-client-deb.yml
1 parent baf6908 commit 1ba361f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/build-client-deb.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ jobs:
3939
mkdir ./build
4040
ls
4141
42-
- name: Extract version from tag
42+
- name: Extract version from VERSION File
4343
id: vars
44-
run: echo "VERSION=${GITHUB_REF_NAME#Release/}" >> $GITHUB_ENV
44+
run: |
45+
VERSION=$(cat VERSION | tr -d ' \n')
46+
echo "VERSION=$VERSION" >> $GITHUB_ENV
47+
4548
- name: Build Bareos Client
4649
working-directory: ./bareos-repo
4750
run: |
4851
cmake -S . -B build -Dclient-only=ON \
4952
-DCMAKE_INSTALL_PREFIX=/usr \
5053
-DCPACK_PACKAGE_CONTACT="contact@libertech.fr" \
51-
-DCPACK_PACKAGE_VERSION="24.0.4" \
54+
-DCPACK_PACKAGE_VERSION="${VERSION}" \
5255
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="contact@libertech.fr" \
5356
-DCPACK_DEBIAN_PACKAGE_DEPENDS="libssl3, zlib1g, libacl1, liblzo2-2, libjansson4, libreadline8" \
5457
-DCPACK_DEBIAN_PACKAGE_CONTROL_EXTRA="debian/preinst;debian/postinst"
@@ -64,11 +67,12 @@ jobs:
6467
- name: Upload DEB as artifact
6568
uses: actions/upload-artifact@v4
6669
with:
67-
name: bareos-client-deb-{{ matrix.distro }}
70+
name: bareos-client-deb-${{ matrix.distro }}
6871
path: bareos-repo/build/*.deb
6972

7073
- name: Attach DEB to GitHub Release
7174
uses: softprops/action-gh-release@v1
75+
if: startsWith(github.ref, 'refs/tags/')
7276
with:
7377
files: bareos-repo/build/*.deb
7478

0 commit comments

Comments
 (0)