summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2021-03-02 16:24:33 +0000
committerGitHub <noreply@github.com>2021-03-02 08:24:33 -0800
commitcd26248fd432e7937ce16c38b159a4a2ff31036e (patch)
tree7c030fb72674deb5f22b92af0a6cc17942ac1f56 /.github
parent2b9d936713e46b6702e6ef3bb9207344af7ad014 (diff)
downloadwabt-cd26248fd432e7937ce16c38b159a4a2ff31036e.tar.gz
wabt-cd26248fd432e7937ce16c38b159a4a2ff31036e.tar.bz2
wabt-cd26248fd432e7937ce16c38b159a4a2ff31036e.zip
CI: add github action to build source release tarball (#1615)
closes #1315 result can be seen here https://github.com/rofl0r/wabt/releases/tag/9.9.99d
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_source_release.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/build_source_release.yml
new file mode 100644
index 00000000..b5003254
--- /dev/null
+++ b/.github/workflows/build_source_release.yml
@@ -0,0 +1,55 @@
+name: Build Source Release
+
+# Trigger whenever a release is created
+on:
+ release:
+ types:
+ - created
+
+jobs:
+ build:
+ name: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/setup-python@v1
+ with:
+ python-version: '3.x'
+
+ - uses: actions/checkout@v1
+ with:
+ submodules: true
+
+ - name: archive
+ id: archive
+ run: |
+ VERSION=${{ github.event.release.tag_name }}
+ PKGNAME="wabt-$VERSION"
+ mkdir -p /tmp/$PKGNAME
+ mv * /tmp/$PKGNAME
+ mv /tmp/$PKGNAME .
+ TARBALL=$PKGNAME.tar.xz
+ SHASUM=$PKGNAME.tar.xz.sha256
+ tar cJf $TARBALL $PKGNAME
+ $PKGNAME/scripts/sha256sum.py $TARBALL > $SHASUM
+ echo "::set-output name=tarball::$TARBALL"
+ echo "::set-output name=shasum::$SHASUM"
+
+ - 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.tarball }}
+ asset_name: ${{ steps.archive.outputs.tarball }}
+ asset_content_type: application/gzip
+
+ - 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