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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: brandon-linux-x86_64
- os: macos-latest
artifact: brandon-macos
- os: windows-latest
artifact: brandon-windows.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Package (Unix)
if: runner.os != 'Windows'
run: |
mkdir dist
cp target/release/brandon dist/${{ matrix.artifact }}
tar -czf ${{ matrix.artifact }}.tar.gz -C dist .
- name: Package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
mkdir dist
Copy-Item target/release/brandon.exe dist/${{ matrix.artifact }}
Compress-Archive dist/* ${{ matrix.artifact }}.zip
- name: Upload artifact (Unix)
if: runner.os != 'Windows'
uses: softprops/action-gh-release@v2
with:
files: "*.tar.gz"
- name: Upload artifact (Windows)
if: runner.os == 'Windows'
uses: softprops/action-gh-release@v2
with:
files: "*.zip"