-
-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (61 loc) · 2.01 KB
/
release_binary.yml
File metadata and controls
67 lines (61 loc) · 2.01 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
name: Release Binaries to GitHub
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
release_win64:
name: Build and release Windows 64Bit
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build
run: |
cargo build --release
Compress-Archive -LiteralPath target/release/throttle.exe -DestinationPath throttle-win64.zip
- name: Github Upload
uses: svenstaro/upload-release-action@2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: throttle-win64.zip
asset_name: throttle-win64.zip
tag: ${{ github.ref }}
release_os-x:
name: Build and release OS-X
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install latests rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --release
- name: Github Upload
uses: svenstaro/upload-release-action@2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/throttle
asset_name: throttle-osx
tag: ${{ github.ref }}
release_musl_linux:
name: Build and release for musl Linux
runs-on: ubuntu-latest
steps:
- name: Setup cross
run: cargo install cross
- uses: actions/checkout@v6
- name: Build server
run: cross build --package throttle-server --release --target x86_64-unknown-linux-musl
- name: Github Upload
uses: svenstaro/upload-release-action@2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-musl/release/throttle
asset_name: throttle-linux-musl
tag: ${{ github.ref }}