github actions release flow (#93)

* intial work on gh actions upload release

* intial work on gh actions upload release

* intial work on gh actions upload release

* intial work on gh actions upload release

* intial work on gh actions upload release
This commit is contained in:
Sagie Gur-Ari 2020-03-28 17:33:49 +03:00 committed by GitHub
parent a5037e949f
commit 9aa4356989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

56
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: Publish
on:
push:
tags:
- '*'
jobs:
build:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-musl
- os: windows-latest
binary_target: x86_64-pc-windows-msvc
- os: macos-latest
binary_target: x86_64-apple-darwin
steps:
- name: Install musl tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install musl-tools
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install rust windows msvc target
if: matrix.os == 'windows-latest'
uses: actions-rs/toolchain@v1
with:
toolchain: stable-x86_64-pc-windows-msvc
profile: minimal
override: true
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --debug cargo-make
- name: Build Binary
uses: actions-rs/cargo@v1
with:
command: make
args: --no-workspace zip-release-ci-flow --env CARGO_MAKE_RELEASE_FLOW_TARGET=${{ matrix.binary_target }}
- name: Upload Binaries
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.zip'
tag: ${{ github.ref }}
overwrite: true
file_glob: true