-
Notifications
You must be signed in to change notification settings - Fork 75
40 lines (39 loc) · 1.4 KB
/
build.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
name: Build Binaries
on:
# TODO: allow workflow dispatch to specify which binaries to build
workflow_dispatch:
push:
tags:
- "**-v[0-9]+.[0-9]+.[0-9]+"
- "**-v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "**-v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "**-v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
jobs:
# TODO: Make generic and run on any tagged release
upload-cli-binaries:
if: startsWith(github.ref, 'refs/tags/cli-v') || github.event_name == 'workflow_dispatch'
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: buildjet-4vcpu-ubuntu-2004
build-tool: cargo
- target: aarch64-apple-darwin
os: macos-latest
build-tool: cargo
- target: x86_64-apple-darwin
os: macos-latest
build-tool: cargo
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
dry-run: ${{ !startsWith(github.ref, 'refs/tags/cli-v') }}
bin: astria-cli
# (optional) Target triple, default is host triple.
target: ${{ matrix.target }}
# (optional) Tool to build binaries (cargo, cross, or cargo-zigbuild)
build-tool: ${{ matrix.build-tool }}
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}