Run strip as a separate step in job build

except on windows.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-05-31 17:23:17 +10:00
parent 3411812ee5
commit 8bdd089775
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -100,6 +100,10 @@ jobs:
- name: Copy and rename utility - name: Copy and rename utility
run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }} run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
- name: Strip the executable
if: ${{ matrix.os != 'windows-latest' }}
run: strip ${{ matrix.output }}
- name: Create archive (tgz, linux) - name: Create archive (tgz, linux)
if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }} if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }}
run: tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }} run: tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}