From c01b74c19da1898323eaf4cdd8d5ca1d97d6385d Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 19 Nov 2023 12:22:09 +0100 Subject: [PATCH] CI: Let github workflow use version number in the flatpak filename --- .github/workflows/testing.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5b57d1c30..3f217baeb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -82,6 +82,10 @@ jobs: steps: - name: Prepare repo uses: actions/checkout@v2 + # Fetch history, so we also fetch the previous tag for deriving + # the version number + with: + fetch-depth: 0 - name: Install system packages # It would be good to cache the GNOME Sdk, as it # is rather big to download each time. @@ -105,10 +109,11 @@ jobs: - name: Export bundle and try to install it run: | mkdir -p dist - flatpak build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo build/flatpak/repo dist/Hamster.flatpak org.gnome.Hamster - flatpak --user -y install dist/Hamster.flatpak + VERSION=$(python src/hamster/version.py) + flatpak build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo build/flatpak/repo "dist/Hamster-$VERSION.flatpak" org.gnome.Hamster + flatpak --user -y install "dist/Hamster-$VERSION.flatpak" - name: Upload built artifact uses: actions/upload-artifact@v2 with: name: Flatpak application - path: dist/Hamster.flatpak + path: dist/*.flatpak