Skip to content

Commit

Permalink
github actions debian use git describe for version
Browse files Browse the repository at this point in the history
  • Loading branch information
DaAwesomeP committed Jun 22, 2023
1 parent b66a17a commit f903797
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ jobs:
- name: Install Git
run: apt-get -y install git
- uses: actions/checkout@v3
- name: Generate build name
shell: bash
run: |
head -n 1 debian/changelog | sed -E "s/ola \((.+)-([0-9]+)\).*/\1~git`./scripts/build_name.sh`-\2/" >> $BUILD_NAME
echo "Build name: $BUILD_NAME"
echo "BUILD_NAME=$BUILD_NAME`" >> $GITHUB_OUTPUT
id: generate-build-name
- name: Install build tools
run: apt-get -y install devscripts adduser fakeroot sudo
- name: Install build dependencies
Expand All @@ -38,7 +45,7 @@ jobs:
chown -R builduser:builduser .
chown builduser:builduser ..
- name: Build
run: sudo -u builduser dpkg-buildpackage -b -rfakeroot -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }}
run: sudo -u builduser dpkg-buildpackage -v${{ steps.generate-build-name.BUILD_NAME }} -b -rfakeroot -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }}
- name: Move built files
if: always()
run: |
Expand Down

0 comments on commit f903797

Please sign in to comment.