build: use PACKAGE_VERSION_LABEL to set generated package's name

If unset use CPACK_PACKAGE_VERSION when set only replaces the version in the package's filename
This commit is contained in:
sithlord48
2024-11-01 11:10:32 -04:00
parent 4a769e6a7f
commit ddf6450486
3 changed files with 15 additions and 25 deletions

View File

@ -209,8 +209,11 @@ jobs:
if: ${{runner.os != 'Linux' }}
run: python ./scripts/setup_venv.py
- name: Get version
uses: ./.github/actions/get-version
- name: Configure
run: ${{env.CMAKE_CONFIGURE}} ${{ matrix.target.config-args }} ${{ steps.get-deps.outputs.vcpkg-cmake-config }}
run: ${{env.CMAKE_CONFIGURE}} ${{ matrix.target.config-args }} ${{ steps.get-deps.outputs.vcpkg-cmake-config }} -DPACKAGE_VERSION_LABEL=${{env.DESKFLOW_PACKAGE_VERSION}}
- name: Build
shell: bash
@ -228,7 +231,7 @@ jobs:
sudo -u build makepkg -s
export OSNAME=$(cat /etc/os-release | grep ^ID= | sed 's/ID=//g')
export ARCH=$(uname -m)
mv *.pkg.* $(ls *.pkg.* | sed "s/$ARCH/$OSNAME-$ARCH/g")
mv *.pkg.tar.zst deskflow-${{env.DESKFLOW_PACKAGE_VERSION}}_${OSNAME}_${ARCH}.pkg.tar.zst
cd ..
fi
@ -238,9 +241,6 @@ jobs:
with:
job: ${{ matrix.target.name }}
- name: Get version
if: ${{ runner.os != 'Linux' }}
uses: ./.github/actions/get-version
- name: Package
if: ${{ runner.os != 'Linux' }}
@ -308,6 +308,9 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Fancy Checkout
uses: sithlord48/fancy-checkout@v1.0.0
- name: Get version
if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v'))
uses: ./.github/actions/get-version