From 49c56e28b4eaf616a8cc2b661e10994e4066d5c4 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 14 Aug 2025 17:10:33 +0200 Subject: [PATCH] build: Improve snapcraft manifest and CI --- .github/workflows/build.yml | 8 +++++++- .github/workflows/release.yml | 8 ++++---- dist/snap/snapcraft.yaml | 5 ++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fc16016c..b60f70ff7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1112,7 +1112,13 @@ jobs: - name: 📜 Set version variable run: | - echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV + export IMHEX_VERSION=$(cat VERSION) + echo "IMHEX_VERSION=$IMHEX_VERSION" >> $GITHUB_ENV + if echo $IMHEX_VERSION | grep -q "WIP"; then + echo "SNAP_GRADE=devel" >> $GITHUB_ENV + else + echo "SNAP_GRADE=stable" >> $GITHUB_ENV + fi echo "CCACHE=ccache" >> $GITHUB_ENV - name: 📜 Move snap directory to root diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c496e6d1..342111db9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -186,17 +186,17 @@ jobs: run: | tagname=${GITHUB_REF#refs/tags/} version=${tagname#v} - wget https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex_${version}_amd64.snap - wget https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex_${version}_arm64.snap + wget https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-x86_64.snap + wget https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-arm64.snap - name: ⬆️ Publish x86_64 Snap package uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.SNAP_STORE_LOGIN }} - snap: imhex_${{ env.IMHEX_VERSION }}_amd64.snap + snap: imhex-${{ env.IMHEX_VERSION }}-x86_64.snap - name: ⬆️ Publish arm64 Snap package uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.SNAP_STORE_LOGIN }} - snap: imhex_${{ env.IMHEX_VERSION }}_arm64.snap \ No newline at end of file + snap: imhex-${{ env.IMHEX_VERSION }}-arm64.snap \ No newline at end of file diff --git a/dist/snap/snapcraft.yaml b/dist/snap/snapcraft.yaml index 2f03c465e..f0128d4d3 100644 --- a/dist/snap/snapcraft.yaml +++ b/dist/snap/snapcraft.yaml @@ -1,4 +1,5 @@ name: imhex +title: ImHex base: core24 version: ${IMHEX_VERSION} summary: Hex editor for reverse engineering @@ -7,11 +8,13 @@ description: | analyzing binary files. It provides a powerful and flexible interface for working with binary data, including features like pattern matching, scripting, and a customizable user interface. -grade: stable +grade: ${SNAP_GRADE} confinement: classic contact: https://github.com/WerWolv/ImHex/discussions issues: https://github.com/WerWolv/ImHex/issues +source-code: https://github.com/WerWolv/ImHex website: https://imhex.werwolv.net +donation: https://github.com/sponsors/WerWolv license: GPL-2.0-only icon: resources/icon.svg adopt-info: imhex