From bd9d210f26e7dc42ba452ee6283696d538e5bbc1 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 2 Aug 2020 18:53:25 -0700 Subject: [PATCH] CI: Add release workflow (#21) --- .github/workflows/release.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..68bf819 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Binaryen.ml Release w/ Archive +on: + push: + tags: + - '*' + +jobs: + build: + name: Create Release + runs-on: macos-latest + steps: + - name: Install git-archive-all + run: | + brew install git-archive-all + + - uses: olegtarasov/get-tag@v2 + id: tag_name + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build archive + run: | + git-archive-all --force-submodules binaryen-archive.tar.gz + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ steps.tag_name.outputs.tag }} + body: | + Changes in this Release + - FILL OUT CHANGES HERE + draft: true + prerelease: ${{ !startsWith(steps.tag_name.outputs.tag, 'v') }} + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./binaryen-archive.tar.gz + asset_name: binaryen-archive-${{ steps.tag_name.outputs.tag }}.tar.gz + asset_content_type: application/gzip