3636 fail-fast : false
3737 matrix :
3838 dist :
39- # - {
40- # name: debian-11,
41- # os: debian,
42- # symbol: bullseye,
43- # arch: amd64
44- # }
4539 - {
4640 name : debian-12,
4741 os : debian,
6256 }
6357
6458 steps :
65- - name : Set up QEMU
66- uses : docker/setup-qemu-action@v3
67-
6859 - name : Set up Docker Buildx
6960 uses : docker/setup-buildx-action@v3
7061
@@ -410,6 +401,13 @@ jobs:
410401 with :
411402 fetch-depth : 0
412403 ref : ${{ github.event.pull_request.head.sha }}
404+
405+ - name : Checkout Source code
406+ if : github.event_name == 'workflow_dispatch'
407+ uses : actions/checkout@v4
408+ with :
409+ ref : ${{ github.sha }}
410+
413411 - name : Set env & Print flameshot version
414412 shell : bash
415413 run : |
@@ -421,8 +419,11 @@ jobs:
421419 echo ${last_committed_tag:1}
422420 echo "Details: ${ver_info}"
423421 echo "================================"
424- echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
422+ # This will allow to build pre-preleases without git tag
423+ # echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
424+ echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
425425 echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
426+
426427 - name : Setup flatpak
427428 run : |
428429 sudo apt-get -y -qq update
@@ -471,6 +472,14 @@ jobs:
471472 with :
472473 fetch-depth : 0
473474 ref : ${{ github.event.pull_request.head.sha }}
475+
476+
477+ - name : Checkout Source code
478+ if : github.event_name == 'workflow_dispatch'
479+ uses : actions/checkout@v4
480+ with :
481+ ref : ${{ github.sha }}
482+
474483 - name : Set env & Print flameshot version
475484 shell : bash
476485 run : |
@@ -482,8 +491,11 @@ jobs:
482491 echo ${last_committed_tag:1}
483492 echo "Details: ${ver_info}"
484493 echo "================================"
485- echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
494+ # This will allow to build pre-preleases without git tag
495+ # echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
496+ echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
486497 echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
498+
487499 - name : Packaging snap
488500 uses : snapcore/action-build@v1
489501 id : snapcraft
0 commit comments