-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.25 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
48
49
50
51
52
53
54
55
name: Build and Release
on:
push:
tags:
- "v*" # Trigger on version tags
env:
CARGO_TERM_COLOR: always
jobs:
build-and-release:
name: Build and Release
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
artifact_name: twintail
asset_name: twintail-linux
- os: windows-latest
artifact_name: twintail.exe
asset_name: twintail-windows.exe
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release -F cli
- name: Rename binary
shell: bash
run: |
cd target/release
mv ${{ matrix.artifact_name }} ${{ matrix.asset_name }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/${{ matrix.asset_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}