summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-04-21 21:53:33 -0400
committerGitHub <noreply@github.com>2020-04-21 18:53:33 -0700
commita1d562a89423de2b27f808749b4771e35c34622c (patch)
tree50902ffcbbfc80b52c4c008ddcc0e05f50f93f88 /.github
parent5fbbdbf8601811f57b880fa02861b7f602fe4b83 (diff)
downloadbinaryen-a1d562a89423de2b27f808749b4771e35c34622c.tar.gz
binaryen-a1d562a89423de2b27f808749b4771e35c34622c.tar.bz2
binaryen-a1d562a89423de2b27f808749b4771e35c34622c.zip
CI: Fix windows asset upload (#2785)
Also add upload of shasum file
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_release.yml40
1 files changed, 31 insertions, 9 deletions
diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml
index cd71a90e4..e34cfbd7c 100644
--- a/.github/workflows/build_release.yml
+++ b/.github/workflows/build_release.yml
@@ -13,6 +13,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
+ defaults:
+ run:
+ shell: bash
steps:
- uses: actions/setup-python@v1
with:
@@ -55,21 +58,40 @@ jobs:
- name: archive
id: archive
run: |
- export VERSION=${{ github.event.release.tag_name }}
- export PKGNAME="binaryen-$VERSION-x86_64-${{ matrix.os }}"
- export TARBALL=$PKGNAME.tar.gz
+ OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//' | sed 's/ubuntu/linux/')
+ VERSION=${{ github.event.release.tag_name }}
+ PKGNAME="binaryen-$VERSION-x86_64-$OSNAME"
+ TARBALL=$PKGNAME.tar.gz
+ SHASUM=$PKGNAME.tar.gz.sha256
mv out/bin binaryen-$VERSION
tar -czf $TARBALL binaryen-$VERSION
- shasum -a 256 $TARBALL > $PKGNAME.tar.gz.sha256
- echo "::set-output name=asset_name::$TARBALL"
+ echo "::set-output name=tarball::$TARBALL"
+ echo "::set-output name=shasum::$SHASUM"
- - name: upload release asset
- id: upload-release-asset
+ - name: upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
- asset_path: ./${{ steps.archive.outputs.asset_name }}
- asset_name: ${{ steps.archive.outputs.asset_name }}
+ asset_path: ./${{ steps.archive.outputs.tarball }}
+ asset_name: ${{ steps.archive.outputs.tarball }}
asset_content_type: application/gzip
+
+ # We do the shasum as a seprate step because this tool doesn't
+ # exit 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:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./${{ steps.archive.outputs.shasum }}
+ asset_name: ${{ steps.archive.outputs.shasum }}
+ asset_content_type: text/plain
+ if: matrix.os != 'windows-latest'