-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.17 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
# Heavily based on
# https://github.com/Nukesor/pueue/blob/4cb610d1da60206806d43180e8d78934a690deb8/.github/workflows/package-binary.yml
name: Build binaries
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
override: true
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target=x86_64-unknown-linux-musl
use-cross: true
- name: Compress binary
uses: svenstaro/upx-action@v2
with:
file: target/x86_64-unknown-linux-musl/release/k8s-job-dispatcher
args: --lzma
strip: true
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-musl/release/k8s-job-dispatcher
asset_name: k8s-job-dispatcher
tag: ${{ github.ref }}
overwrite: true