-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.4 KB
/
release-for-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
on:
release:
types: [created]
jobs:
release:
name: release x86_64-apple-darwin
runs-on: macos-latest
steps:
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
override: true
- name: Checking out sources
uses: actions/checkout@v1
- name: Running cargo build
uses: actions-rs/cargo@v1
with:
command: build
toolchain: stable
args: --locked --release --target x86_64-apple-darwin"
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Packaging final binary
shell: bash
run: |
cd target/x86_64-apple-darwin/release
tar czvf genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz genius
shasum -a 512 genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz > genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/x86_64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz
target/x86_64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}