From e1006767100084a40b1ef09f60eadc807a549ed3 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 12 Jan 2022 20:09:07 -0800 Subject: Update github action used to publish releases. NFC (#1804) It seems that the action we were using is not longer working: https://github.com/actions/upload-release-asset See https://github.com/WebAssembly/binaryen/pull/4148 --- .github/workflows/build_release.yml | 23 +++++++++++------------ .github/workflows/build_source_release.yml | 23 +++++++++++------------ 2 files changed, 22 insertions(+), 24 deletions(-) (limited to '.github') diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 5efb7273..1c75638e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -6,6 +6,9 @@ on: types: - created +permissions: + contents: write + jobs: build: name: build @@ -70,21 +73,17 @@ jobs: echo "::set-output name=shasum::$SHASUM" - name: upload tarball - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.archive.outputs.tarball }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./${{ steps.archive.outputs.tarball }} asset_name: ${{ steps.archive.outputs.tarball }} - asset_content_type: application/gzip + tag: ${{ github.ref }} - name: upload shasum - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.archive.outputs.shasum }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./${{ steps.archive.outputs.shasum }} asset_name: ${{ steps.archive.outputs.shasum }} - asset_content_type: text/plain + tag: ${{ github.ref }} diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/build_source_release.yml index b5003254..7b0d753a 100644 --- a/.github/workflows/build_source_release.yml +++ b/.github/workflows/build_source_release.yml @@ -6,6 +6,9 @@ on: types: - created +permissions: + contents: write + jobs: build: name: build @@ -35,21 +38,17 @@ jobs: echo "::set-output name=shasum::$SHASUM" - name: upload tarball - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.archive.outputs.tarball }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./${{ steps.archive.outputs.tarball }} asset_name: ${{ steps.archive.outputs.tarball }} - asset_content_type: application/gzip + tag: ${{ github.ref }} - name: upload shasum - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.archive.outputs.shasum }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./${{ steps.archive.outputs.shasum }} asset_name: ${{ steps.archive.outputs.shasum }} - asset_content_type: text/plain + tag: ${{ github.ref }} -- cgit v1.2.3