-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a simple GitHub release process
- Loading branch information
1 parent
7dcd6c4
commit c4ccf06
Showing
1 changed file
with
42 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,42 @@ | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
name: Release | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
name: linux | ||
ext: '' | ||
- os: macos-latest | ||
name: darwin | ||
ext: '' | ||
- os: windows-latest | ||
name: windows | ||
ext: '.exe' | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install stack | ||
if: matrix.os != 'ubuntu-latest' | ||
run: curl -sSL https://get.haskellstack.org/ | sh | ||
shell: bash | ||
- name: Build binary | ||
run: stack install && cp $(stack path --local-bin)/bel-exe${{ matrix.ext }} . | ||
shell: bash | ||
- name: Upload binary | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: bel-exe${{ matrix.ext }} | ||
asset_name: bel-x86_64-${{ matrix.name }}${{ matrix.ext}} | ||
asset_content_type: application/octet-stream |