ci: 🎡 add release action

This commit is contained in:
Stepan Kuzmin 2019-09-29 16:30:54 +03:00
parent 5b9a864949
commit 682bc879f7
No known key found for this signature in database
GPG Key ID: 41335DA6EE45C2B6

45
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: cargo build --release
- name: Compress
run: |
cd ./target/release
zip martin-linux-${{ github.ref }}.zip martin
shasum -a 256 martin-linux-${{ github.ref }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
files: martin-linux-${{ github.ref }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
macos:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: cargo build --release
- name: Compress
run: |
cd ./target/release
zip martin-macos-${{ github.ref }}.zip martin
shasum -a 256 martin-macos-${{ github.ref }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
files: martin-macos-${{ github.ref }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}