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.
This commit is contained in:
liang.he 2025-06-06 15:05:04 +08:00 committed by GitHub
parent 602e86adc3
commit 48a97736b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -137,7 +137,8 @@ jobs:
- name: compress the binary on non-Windows - name: compress the binary on non-Windows
if: inputs.runner != 'windows-latest' if: inputs.runner != 'windows-latest'
run: | 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 zip iwasm${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
working-directory: ${{ inputs.cwd }}/build working-directory: ${{ inputs.cwd }}/build

View File

@ -73,7 +73,8 @@ jobs:
- name: compress the binary on non-Windows - name: compress the binary on non-Windows
if: inputs.runner != 'windows-latest' && inputs.release if: inputs.runner != 'windows-latest' && inputs.release
run: | 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 zip wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc
working-directory: wamr-compiler/build working-directory: wamr-compiler/build