release action

This commit is contained in:
Robin Appelman 2021-02-20 18:24:26 +01:00
commit d723a22d9b

39
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Release
on:
release:
types: [created]
jobs:
release:
name: Build release
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/notify-redis
asset_name: notify-redis-${{ matrix.target }}
tag: ${{ github.ref }}