diff options
author | Роман Донченко <dpb@corrigendum.ru> | 2021-04-22 20:18:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 10:18:33 -0700 |
commit | ba8955f80b58e9a18b675c399b39a547d96facc2 (patch) | |
tree | a77f8e3869696406ee456105cb89edde6821dd59 | |
parent | 0379e8b42daa116336f2688d02eeebed2240a99c (diff) | |
download | binaryen-ba8955f80b58e9a18b675c399b39a547d96facc2.tar.gz binaryen-ba8955f80b58e9a18b675c399b39a547d96facc2.tar.bz2 binaryen-ba8955f80b58e9a18b675c399b39a547d96facc2.zip |
Create a shasum file for the Windows tarball (#3832)
CMake has a `sha256sum` subcommand that can be used to calculate checksums
portably. Use it in the release workflow to create checksums on Windows.
For consistency, use it on macOS and Linux too.
-rw-r--r-- | .github/workflows/build_release.yml | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 4c7648654..8efcdc7f0 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -61,6 +61,8 @@ jobs: SHASUM=$PKGNAME.tar.gz.sha256 mv out/install binaryen-$VERSION tar -czf $TARBALL binaryen-$VERSION + # on Windows, MSYS2 will strip the carriage return from CMake output + cmake -E sha256sum $TARBALL > $SHASUM echo "::set-output name=tarball::$TARBALL" echo "::set-output name=shasum::$SHASUM" @@ -74,13 +76,6 @@ jobs: asset_name: ${{ steps.archive.outputs.tarball }} asset_content_type: application/gzip - # We do the shasum as a seprate step because this tool doesn't - # exist on windows. - - name: shasum - id: shasum - run: shasum -a 256 ${{ steps.archive.outputs.tarball }} > ${{ steps.archive.outputs.shasum }} - if: matrix.os != 'windows-latest' - - name: upload shasum uses: actions/upload-release-asset@v1 env: @@ -90,7 +85,6 @@ jobs: asset_path: ./${{ steps.archive.outputs.shasum }} asset_name: ${{ steps.archive.outputs.shasum }} asset_content_type: text/plain - if: matrix.os != 'windows-latest' # Build with gcc 6.3 and run tests on Alpine Linux (inside chroot). # Note: Alpine uses musl libc. @@ -137,7 +131,7 @@ jobs: ./alpine.sh find install/ -type f -perm -u=x -exec strip {} + mv install binaryen-$VERSION tar -czf $TARBALL binaryen-$VERSION - shasum -a 256 $TARBALL > $SHASUM + cmake -E sha256sum $TARBALL > $SHASUM echo "::set-output name=tarball::$TARBALL" echo "::set-output name=shasum::$SHASUM" |