Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 33 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# GitHub Actions: tag-triggered prebuilt-binary release (F166).
#
# Pushing a tag like `v0.6.6` builds the `ccteam` binary on four targets,
# Pushing a tag like `v0.6.6` builds the `ccteam` binary on three targets,
# packages each with a per-asset SHA-256 sum, aggregates a single
# SHA256SUMS file, and uploads everything to the corresponding GitHub
# Release. `install.sh` (repo root) reads these assets — keep the asset
# naming `ccteam-<tag>-<suffix>.<ext>` and the suffix vocabulary
# (linux-x64 / macos-arm64 / macos-x64 / windows-x64) in lockstep with
# that script.
# (linux-x64 / macos-arm64 / macos-x64) in lockstep with that script.
#
# Windows is intentionally out of scope: ccteam's foundation is tmux +
# inotify + POSIX signals (`libc::SIGKILL` / `SIGTERM` in
# `crates/ccteam-core/src/harness.rs`), which are unix-only. Windows
# users run ccteam under WSL2 with the linux-x64 binary.
#
# The repo-guard on every job stops a fork that accidentally inherits
# this workflow from publishing under the upstream release page.
Expand Down Expand Up @@ -41,10 +45,6 @@ jobs:
target: x86_64-apple-darwin
suffix: macos-x64
ext: tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
suffix: windows-x64
ext: zip
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -64,6 +64,27 @@ jobs:
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# Pre-install the SPA `node_modules/` before `cargo build` so the
# `ccteam-web` build.rs (which feature-gates on `web-bundle`,
# default-on) finds them and skips its own `npm install`. We split
# by runner OS because `package-lock.json` is generated on Linux
# and only resolves the linux-x64 rolldown native binding; macOS
# `npm ci` would honor that lockfile and skip the darwin
# `optionalDependencies`, leaving rolldown unable to load
# `.darwin-arm64.node` at build time. Clearing the lockfile on
# macOS forces a fresh platform-correct resolution.
- name: Pre-install web SPA deps (linux fast path with lockfile)
if: runner.os == 'Linux'
working-directory: crates/ccteam-web/web
run: npm ci --no-audit --no-fund --include=optional

- name: Pre-install web SPA deps (macOS — drop lockfile for native binding refresh)
if: runner.os == 'macOS'
working-directory: crates/ccteam-web/web
run: |
rm -f package-lock.json
npm install --no-audit --no-fund --include=optional

- name: Build ccteam binary
run: cargo build --release --locked --target ${{ matrix.target }} --bin ccteam

Expand All @@ -86,30 +107,13 @@ jobs:
shasum -a 256 "${PKG}.tar.gz" > "${PKG}.tar.gz.sha256"
fi

- name: Package (windows)
if: matrix.ext == 'zip'
shell: pwsh
run: |
$tag = $env:GITHUB_REF_NAME
$pkg = "ccteam-$tag-${{ matrix.suffix }}"
$stage = Join-Path ([System.IO.Path]::GetTempPath()) $pkg
New-Item -ItemType Directory -Force -Path $stage | Out-Null
Copy-Item "target/${{ matrix.target }}/release/ccteam.exe" "$stage/ccteam.exe"
Copy-Item "README.md" "$stage/README.md"
Copy-Item "LICENSE" "$stage/LICENSE"
Compress-Archive -Path $stage -DestinationPath "$pkg.zip" -Force
$hash = (Get-FileHash "$pkg.zip" -Algorithm SHA256).Hash.ToLower()
"$hash $pkg.zip" | Out-File -FilePath "$pkg.zip.sha256" -Encoding ascii

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ccteam-${{ matrix.suffix }}
path: |
ccteam-*-${{ matrix.suffix }}.tar.gz
ccteam-*-${{ matrix.suffix }}.tar.gz.sha256
ccteam-*-${{ matrix.suffix }}.zip
ccteam-*-${{ matrix.suffix }}.zip.sha256
if-no-files-found: error
retention-days: 7

Expand Down Expand Up @@ -150,7 +154,10 @@ jobs:
cat > release-notes.md <<EOF
# ccteam ${TAG}

Prebuilt binaries for Linux, macOS (Intel + Apple Silicon), and Windows.
Prebuilt binaries for Linux x86_64 and macOS (Intel + Apple Silicon).
Windows users: run ccteam under WSL2 with the linux-x64 binary
(ccteam's foundation is tmux + inotify + POSIX signals, which
are unix-only).

## Install (zero-Rust)

Expand Down Expand Up @@ -196,4 +203,4 @@ jobs:
--repo "${GITHUB_REPOSITORY}" \
--title "ccteam ${TAG}" \
--notes-file ../release-notes.md \
ccteam-*.tar.gz ccteam-*.zip SHA256SUMS
ccteam-*.tar.gz SHA256SUMS
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ ccteam init <project>
```

Supported platforms for the prebuilt binary: Linux x86_64, macOS arm64
(Apple Silicon), macOS x86_64 (Intel), Windows x86_64 (download the zip
from the releases page — the install script is POSIX-only). On macOS,
(Apple Silicon), macOS x86_64 (Intel). Windows users: install via WSL2
and use the linux-x64 binary — native Windows isn't supported because
tmux + inotify + POSIX signals are foundational to ccteam. On macOS,
if Gatekeeper blocks the binary on first run:
`xattr -d com.apple.quarantine ~/.local/bin/ccteam`.

Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ ccteam --version # 应输出当前版本号

默认装到 `~/.local/bin/ccteam`。装完如果该路径不在 `$PATH`,脚本会打印一行 export 指令(贴进 `~/.bashrc` / `~/.zshrc` 再 `source` 即可)。

支持的平台:Linux x86_64、macOS arm64(Apple Silicon)、macOS x86_64(Intel)。Windows 用户直接到 [Releases 页面](https://github.com/firstintent/ccteam/releases)下载 `windows-x64.zip` 解压(`install.sh` 是 POSIX 脚本,不跑 Windows)。
支持的平台:Linux x86_64、macOS arm64(Apple Silicon)、macOS x86_64(Intel)。Windows 用户走 WSL2 + linux-x64 binary —— native Windows 不支持(tmux + inotify + POSIX signals 是 ccteam 架构根基)。

环境变量:
- `CCTEAM_INSTALL_DIR=/usr/local/bin sh install.sh` —— 改装目录(系统级安装)
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# * No sudo. Writes to $HOME/.local/bin by default.
# * Override target dir: CCTEAM_INSTALL_DIR=/usr/local/bin sh install.sh
# * Override tag (CI / pin): CCTEAM_VERSION=v0.6.6 sh install.sh
# * Windows is not supported — use the GitHub Releases page (zip).
# * Windows is not supported — run ccteam under WSL2 and use the
# linux-x64 binary (tmux + inotify + POSIX signals are foundational).
#
# Usage:
# curl -sSL https://raw.githubusercontent.com/firstintent/ccteam/main/install.sh | sh
Expand Down
Loading