From 48a97736b3c12fb1a2abba3932415814474e60a6 Mon Sep 17 00:00:00 2001 From: "liang.he" Date: Fri, 6 Jun 2025 15:05:04 +0800 Subject: [PATCH] Update binary compression steps to follow symlinks for actual files (#4321) By default, zip follows symbolic links and includes the actual files or directories they point to in the archive. --- .github/workflows/build_iwasm_release.yml | 3 ++- .github/workflows/build_wamrc.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_iwasm_release.yml b/.github/workflows/build_iwasm_release.yml index 74c2340af..a975d5807 100644 --- a/.github/workflows/build_iwasm_release.yml +++ b/.github/workflows/build_iwasm_release.yml @@ -137,7 +137,8 @@ jobs: - name: compress the binary on non-Windows if: inputs.runner != 'windows-latest' run: | - tar czf iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm + # Follow the symlink to the actual binary file + tar --dereference -czf iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm zip iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm working-directory: ${{ inputs.cwd }}/build diff --git a/.github/workflows/build_wamrc.yml b/.github/workflows/build_wamrc.yml index 6b687c749..55d63f13b 100644 --- a/.github/workflows/build_wamrc.yml +++ b/.github/workflows/build_wamrc.yml @@ -73,7 +73,8 @@ jobs: - name: compress the binary on non-Windows if: inputs.runner != 'windows-latest' && inputs.release run: | - tar czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc + # Follow the symlink to the actual binary file + tar --dereference -czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc zip wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc working-directory: wamr-compiler/build