-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (43 loc) · 1.23 KB
/
release.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
41
42
43
44
45
46
47
name: Release
on:
release:
types: [ created ]
env:
CARGO_TERM_COLOR: always
REPO: git-graph
jobs:
release:
name: Release for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
bin_extension: ""
os_name: "linux-amd64"
- os: windows-latest
bin_extension: ".exe"
os_name: "windows-amd64"
- os: macos-latest
bin_extension: ""
os_name: "macos-amd64"
steps:
- uses: actions/checkout@v2
- name: Get tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
shell: bash
- name: Build
run: |
cargo build --release
- name: Compress
run: |
cp -f target/release/$REPO${{ matrix.bin_extension }} .
tar -czf release.tar.gz $REPO${{ matrix.bin_extension }}
shell: bash
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release.tar.gz
asset_name: ${{ env.REPO }}-${{ env.RELEASE_VERSION }}-${{ matrix.os_name }}.tar.gz
tag: ${{ github.ref }}