-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (50 loc) · 1.3 KB
/
release.yaml
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: Release
on:
pull_request:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
jobs:
checks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
toolchain:
- 1.77.2
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
with:
just-version: 1.25.2
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-${{ matrix.toolchain }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
- name: Install musl tools
run: sudo apt-get install -y musl-tools
- name: Build binary (x86 and ARM64)
run: just cargo-build
- name: Generate artifacts
run: just release-artifacts
- uses: actions/upload-artifact@v3
with:
name: binaries
path: artifacts/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/*
generate_release_notes: true