-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (36 loc) · 1.16 KB
/
bin-assets.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
name: Add bins to assets
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Add x86_64-pc-windows-gnu target
run: rustup target add x86_64-pc-windows-gnu
- name: Run tests
run: cargo test --verbose
- name: Install mingw-w64
run: sudo apt-get install -y mingw-w64
- name: Build x86_64-pc-windows-gnu
run: cargo build --target x86_64-pc-windows-gnu --release --verbose
- name: Build x86_64-unknown-linux-gnu
run: cargo build --target x86_64-unknown-linux-gnu --release --verbose
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-gnu/release/parser
asset_name: parser.bin
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-pc-windows-gnu/release/parser.exe
asset_name: parser.exe