From 4abc21940c4a4add5895cea7a68c22a42508e226 Mon Sep 17 00:00:00 2001 From: Yurzs Date: Tue, 9 Jan 2024 15:38:02 +0700 Subject: [PATCH] ci/cd: add alias for aarch64 --- .github/workflows/release.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ecf4e4..e97f2c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,18 +67,35 @@ jobs: - run: | make ARCH="${{ matrix.s6_arch }}" VERSION="${{ env.S6_VERSION }}" + # add alias for architecture + - run: | + if [ "$S6_HW" = "aarch64" ] ; then + echo "S6_HW_ALIAS"="arm64" >> $GITHUB_ENV + else + echo "S6_HW_ALIAS"="$S6_HW" >> $GITHUB_ENV + fi + + # copy files to alias names if needed + - run: | + if [ "$S6_HW" != "S6_HW_ALIAS" ] ; then + cd output ; + for f in *$S6_HW.tar.* ; + do cp -v "$f" $(echo "$f" | sed "s/$S6_HW/$S6_HW_ALIAS/g") ; + done + fi + - run: | cd output ; for f in *.tar* ; do sha256sum "$f" > "$f".sha256 ; done # output arch-specific binary - uses: ncipollo/release-action@v1 with: - artifacts: "output/s6-overlay-${{ env.S6_HW }}*" + artifacts: "output/s6-overlay-(${{ env.S6_HW }}|{{ env.S6_HW_ALIAS }})*" omitBodyDuringUpdate: true allowUpdates: true - run: | - rm -v output/s6-overlay-${{ env.S6_HW }}* + rm -v output/s6-overlay-(${{ env.S6_HW }}|${{ env.S6_HW_ALIAS }})* # upload symlinks/non-arch on x86_64 only - uses: ncipollo/release-action@v1