Files
claude-code-usage-bubble/.github/workflows/ci.yml
T
tiennm99 d8f339208d fix: list the desktop icons in bundle.icon
The bundler has no icon fallback, so an empty list breaks the AppImage
step and ships a deb without hicolor icons. Put icon.png first so it stays
the default window icon on Linux and macOS, and bundle the deb in the
Linux CI row to catch a broken list before release.
2026-10-21 12:04:54 +07:00

97 lines
2.6 KiB
YAML

name: CI
on:
push:
branches: [main, feat/tauri-port]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v7
with:
node-version: lts/*
cache: npm
- name: Install Linux build prerequisites
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
- run: npm ci
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
- run: npm run lint
- run: npm test
- run: npm run tauri build -- --no-bundle
# The bundler has no icon fallback, so a bad bundle.icon list only
# breaks packaging; the deb needs no patchelf and catches it early.
- name: Bundle the deb
if: runner.os == 'Linux'
run: npm run tauri build -- --bundles deb
- name: Check the exe version resource
if: runner.os == 'Windows'
shell: pwsh
run: |
$match = Select-String -Path Cargo.toml -Pattern '^version\s*=\s*"([^"]+)"' | Select-Object -First 1
$cargoVersion = $match.Matches.Groups[1].Value
$info = (Get-Item target/release/claude-code-usage-bubble.exe).VersionInfo
$info | Format-List ProductName, CompanyName, FileDescription, FileVersion, ProductVersion, LegalCopyright
if ($info.ProductVersion -ne $cargoVersion) {
Write-Error "ProductVersion '$($info.ProductVersion)' does not match Cargo.toml version '$cargoVersion'"
exit 1
}
- name: Upload the Windows exe
if: runner.os == 'Windows'
uses: actions/upload-artifact@v7
with:
name: bubble-exe-${{ github.sha }}
path: target/release/claude-code-usage-bubble.exe
retention-days: 7
if-no-files-found: error
macos-check:
name: macos-latest (cargo check)
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-targets --locked