Skip to content

Commit

Permalink
CI: Let github workflow use version number in the flatpak filename
Browse files Browse the repository at this point in the history
Note: For pull requests, the version that is tested is an autogenerated
temporary merge commit (which is good, since it tests whether things
work *after* merging), but that commit id is also included in the
filename which might be bit suprising. To be considered later.
  • Loading branch information
matthijskooijman committed Nov 19, 2023
1 parent 3875623 commit c062980
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -105,10 +109,14 @@ 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
# Note: For pull requests, this version includes the git hash
# of the autogenerated *merge* commit, not the original
# to-be-merged commit (because that's also what is tested).
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

0 comments on commit c062980

Please sign in to comment.