-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.06 KB
/
ci.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: Rust
on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: networking_challenges
asset_name: networking_challenges-linux-amd64
- os: windows-latest
artifact_name: networking_challenges.exe
asset_name: networking_challenges-windows-amd64.exe
steps:
- uses: actions/checkout@v2
- name: Run tests
run: cargo test --verbose
- name: Release
run: cargo build --release --verbose
- name: Strip the released binary
if: ${{ matrix.os == 'ubuntu-latest'}}
run: strip target/release/${{ matrix.artifact_name }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: v1.0.1
overwrite: true
body: "New release!"