build: Improve snapcraft manifest and CI

This commit is contained in:
WerWolv
2025-08-14 17:10:33 +02:00
parent 3ec4f086ec
commit 49c56e28b4
3 changed files with 15 additions and 6 deletions

View File

@@ -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

View File

@@ -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
snap: imhex-${{ env.IMHEX_VERSION }}-arm64.snap

View File

@@ -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