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
name: release-binaries
# Fires when release-plz (or a manual tag) publishes a GitHub Release.
on:
release:
types:
permissions:
contents: write
jobs:
upload:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# Native targets only. HTTP/3 + aws-lc-rs make musl / cross targets
# fragile; add aarch64-linux / musl once they are confirmed to build.
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
os: macos-13
- target: x86_64-pc-windows-msvc
os: windows-latest
steps:
- uses: actions/checkout@v4
# aws-lc-rs builds aws-lc-sys via CMake on Windows, which needs a
# discoverable MSVC toolchain plus NASM (see ci.yml for the same setup).
- name: Set up MSVC environment (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install NASM (Windows)
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: speed-cli
target: ${{ matrix.target }}
tar: unix
zip: windows
checksum: sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Once binaries are uploaded, bump the formula in the external Homebrew tap.
# This no-ops cleanly until the maintainer provisions the HOMEBREW_TAP_TOKEN
# secret and seeds an initial Formula/speed-cli.rb in justin13888/homebrew-tap
# (one-time setup documented in CONTRIBUTING.md).
bump-homebrew:
name: Bump Homebrew tap
needs: upload
runs-on: ubuntu-latest
steps:
# secrets can't be used in a job-level `if:`, so gate on a step output.
- name: Check for tap token
id: gate
env:
TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: echo "enabled=${{ env.TAP_TOKEN != '' }}" >> "$GITHUB_OUTPUT"
- name: Bump formula
if: steps.gate.outputs.enabled == 'true'
uses: dawidd6/action-homebrew-bump-formula@v7
with:
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
tap: justin13888/homebrew-tap
formula: speed-cli
tag: ${{ github.event.release.tag_name }}