Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
CI: Add release workflow (#21)
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |