claude-code-status-line 1.2.9

A configurable status line for Claude Code with powerline arrows, context tracking, and quota monitoring
Documentation
name: Release

on:
  release:
    types: [created]

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