From 0e14ff5a3dab4cb3aaeb25e447fab28f410e6e18 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 31 Aug 2025 10:33:50 +0200 Subject: [PATCH] git: Fix naming and uploading of snap artifacts --- .github/workflows/build.yml | 10 +++++++--- .github/workflows/nightly_release.yml | 2 -- dist/snap/snapcraft.yaml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1af61736..c9ffb0251 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1118,16 +1118,16 @@ jobs: export IMHEX_VERSION=$(cat VERSION) if [[ "$IMHEX_VERSION" == *.WIP ]]; then - echo "IMHEX_VERSION=$IMHEX_VERSION-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV + echo "IMHEX_VERSION_STRING=$IMHEX_VERSION-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV else - echo "IMHEX_VERSION=$IMHEX_VERSION" >> $GITHUB_ENV + echo "IMHEX_VERSION_STRING=$IMHEX_VERSION" >> $GITHUB_ENV fi echo "CCACHE=ccache" >> $GITHUB_ENV - name: 📜 Move snap directory to root run: | mkdir -p ./snap - envsubst '${IMHEX_VERSION},${CCACHE}' < ./dist/snap/snapcraft.yaml > ./snap/snapcraft.yaml + envsubst '${IMHEX_VERSION_STRING},${CCACHE}' < ./dist/snap/snapcraft.yaml > ./snap/snapcraft.yaml - name: 📜 Setup ccache uses: hendrikmuhs/ccache-action@v1 @@ -1140,6 +1140,10 @@ jobs: run: | sudo snapcraft --destructive-mode + - name: 🟩 Rename Snap + run: | + mv *.snap imhex-${{ env.IMHEX_VERSION }}-${{ matrix.architecture }}.snap + - name: 🗝️ Generate build provenance attestations uses: actions/attest-build-provenance@v2 if: ${{ github.event.repository.fork == false && github.event_name != 'pull_request' }} diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index 8e516f6fa..f4cbae259 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -63,8 +63,6 @@ jobs: mv "Windows Portable arm64.zip" imhex-${{ env.IMHEX_VERSION }}-Windows-Portable-arm64.zip mv "Windows Portable NoGPU x86_64.zip" imhex-${{ env.IMHEX_VERSION }}-Windows-Portable-NoGPU-x86_64.zip mv "ImHex Web.zip" imhex-${{ env.IMHEX_VERSION }}-Web.zip - mv ./*_amd64.snap $(echo ./*_amd64.snap | sed 's/_amd64\.snap$/-x86_64.snap/' | sed 's/_/-/1') - mv ./*_arm64.snap $(echo ./*_arm64.snap | sed 's/_arm64\.snap$/-arm64.snap/' | sed 's/_/-/1') rm artifact.tar || true - name: 📖 Generate Release Notes diff --git a/dist/snap/snapcraft.yaml b/dist/snap/snapcraft.yaml index a0894115f..5a55c1740 100644 --- a/dist/snap/snapcraft.yaml +++ b/dist/snap/snapcraft.yaml @@ -1,7 +1,7 @@ name: imhex title: ImHex base: core24 -version: ${IMHEX_VERSION} +version: ${IMHEX_VERSION_STRING} summary: Hex editor for reverse engineering description: ImHex is a hex editor for reverse engineering, reverse engineering, and 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