Update build-client-deb.yml #74
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Bareos DEB packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-deb: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y build-essential cmake git \ | |
| libssl-dev zlib1g-dev libacl1-dev liblzo2-dev \ | |
| libjansson-dev bison flex python3-dev libpq-dev \ | |
| libreadline-dev pkg-config fakeroot liblzma-dev \ | |
| chrpath libcap-dev qtbase5-dev libjson-c-dev mtx debhelper \ | |
| po-debconf libxml2-dev libx11-dev libcli11-dev ncurses-dev openssl systemd \ | |
| libexpected-dev libfmt-dev libmsgsl-dev libutfcpp-dev \ | |
| libfastlz-dev libzstd-dev default-jdk-headless | |
| - name: Clone Bareos sources | |
| run: | | |
| git clone https://github.com/bareos/bareos.git bareos-repo | |
| - name: Extract version from VERSION File | |
| id: vars | |
| run: | | |
| VERSION=$(cat VERSION | tr -d ' \n') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Checkout release | |
| working-directory: ./bareos-repo | |
| run: | | |
| git fetch --all | |
| git checkout Release/$VERSION | |
| - name: Prepare debian/changelog | |
| working-directory: ./bareos-repo | |
| run: | | |
| echo "bareos ($VERSION) stable; urgency=medium" > debian/changelog | |
| echo "" >> debian/changelog | |
| echo " * Automated build from GitHub Actions." >> debian/changelog | |
| echo "" >> debian/changelog | |
| echo " -- Libertech <contact@libertech.fr> $(date -R)" >> debian/changelog | |
| cat debian/changelog | |
| - name: Build all Bareos components | |
| working-directory: ./bareos-repo | |
| run: | | |
| dpkg-buildpackage -us -uc -rfakeroot -b | |
| - name: Upload DEB packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bareos-debs-${{ env.VERSION }} | |
| path: ../*.deb | |