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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Release
on:
release:
types:
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: claude-code-status-line
asset_name: claude-code-status-line-linux-x86_64
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
binary_name: claude-code-status-line
asset_name: claude-code-status-line-linux-x86_64-musl
- os: macos-latest
target: x86_64-apple-darwin
binary_name: claude-code-status-line
asset_name: claude-code-status-line-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
binary_name: claude-code-status-line
asset_name: claude-code-status-line-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: claude-code-status-line.exe
asset_name: claude-code-status-line-windows-x86_64.exe
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Install musl tools (Linux musl only)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get install -y musl-tools
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: Strip binary (Linux/macOS)
if: matrix.os != 'windows-latest'
run: strip target/${{ matrix.target }}/release/${{ matrix.binary_name }}
- name: Prepare release asset
if: matrix.os != 'windows-latest'
run: cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} target/${{ matrix.target }}/release/${{ matrix.asset_name }}
- name: Prepare release asset (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cd target/${{ matrix.target }}/release
Copy-Item ${{ matrix.binary_name }} ${{ matrix.asset_name }}
- name: Upload binary to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: target/${{ matrix.target }}/release/${{ matrix.asset_name }}
- name: Create checksum
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
shasum -a 256 ${{ matrix.binary_name }} > ${{ matrix.asset_name }}.sha256
- name: Create checksum (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cd target/${{ matrix.target }}/release
(Get-FileHash -Algorithm SHA256 ${{ matrix.binary_name }}).Hash.ToLower() + " ${{ matrix.binary_name }}" | Out-File -Encoding ASCII ${{ matrix.asset_name }}.sha256
- name: Upload checksum to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: target/${{ matrix.target }}/release/${{ matrix.asset_name }}.sha256