-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9da30c
commit 7171b22
Showing
1 changed file
with
53 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,53 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
name: Release binary | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
artifact_name: mocword | ||
asset_name: mocword-x86_64-unknown-linux-musl | ||
- os: ubuntu-latest | ||
target: x86_64-pc-windows-gnu | ||
artifact_name: mocword.exe | ||
asset_name: mocword-x86_64-pc-windows-gnu.exe | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
artifact_name: mocword | ||
asset_name: mocword-x86_64-apple-darwin | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Cross build with all features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target ${{ matrix.target }} --all-features --verbose | ||
|
||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@2.1.1 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }} | ||
asset_name: ${{ matrix.asset_name }} | ||
tag: ${{ github.ref }} | ||
overwrite: true |