Repository navigation
77 lines (67 loc) · 1.85 KB
/
Copy pathrelease-binaries.yml
File metadata and controls
77 lines (67 loc) · 1.85 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
68
69
70
71
72
73
74
75
76
77
name: Release Binaries
on:
workflow_dispatch:
inputs:
ref:
description: Git tag or ref to build
required: true
type: string
allow_untagged:
description: Allow non-release refs for validation artifacts
required: true
default: false
type: boolean
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- platform: linux
os: ubuntu-latest
artifact: mythenheim-linux-release-binary
- platform: windows
os: windows-latest
artifact: mythenheim-windows-release-binary
- platform: macos
os: macos-latest
artifact: mythenheim-macos-release-binary
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v7
with:
python-version: "3.x"
check-latest: true
- name: Install Rust toolchain
run: rustup show
- name: Build release binary
shell: bash
run: |
args=(
"${{ matrix.platform }}"
"--repo" "."
"--ref" "${{ inputs.ref }}"
"--out-dir" "target/release-binaries"
)
if [ "${{ inputs.allow_untagged }}" = "true" ]; then
args+=("--allow-untagged")
fi
python scripts/build_release_binary.py "${args[@]}"
- name: Upload release binary artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}
path: target/release-binaries/*
if-no-files-found: error