From 1400d13f6b859eb25a9a18c7b5cb3b11b277ab4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Stucke?= Date: Thu, 29 Aug 2024 08:58:02 +0200 Subject: [PATCH] feat!: replace binary with compressed source release --- .github/workflows/release.yml | 14 +++++++------- Makefile | 10 +++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe8f0a6..b85a3ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,23 +5,23 @@ on: jobs: release: - # We use Ubuntu 20.04 to have an older version of the file tool. - # If we used a newer Ubuntu it it would complain about incompatible magic - # file format on older Ubuntu versions. - runs-on: ubuntu-20.04 + # Compiled magic files are incompatible with older and (for whatever + # reason) also newer versions of `file`. + # Therefore, we only release the concatenated, compressed source file. + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Install Make - run: sudo apt-get install make + run: sudo apt-get install make xz-utils - name: Build - run: make all + run: make xz - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: firmware.mgc + files: firmware.xz diff --git a/Makefile b/Makefile index 52c76f1..abd5f25 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,19 @@ -all: firmware.mgc +all: mgc xz + +mgc: firmware.mgc firmware.mgc: firmware file -C -m firmware +xz: firmware.xz + +firmware.xz: firmware + xz -f -7 firmware + firmware: cat mime/* > firmware clean: rm -f firmware rm -f firmware.mgc + rm -f firmware.xz