mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-27 04:30:59 +00:00
The SDK is broken for bun builds, and these had poor support for various reasons anyway. Going to turn off these pipelines until we can fix.
157 lines
4.9 KiB
YAML
157 lines
4.9 KiB
YAML
name: Publish and Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
environment: release # Optional: for enhanced security
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
# Generating a GitHub token, so that PRs and tags created by
|
|
# the release-please-action can trigger actions workflows.
|
|
- name: Generate GitHub token
|
|
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
|
|
id: generate-token
|
|
with:
|
|
# GitHub App ID secret name
|
|
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
|
|
# GitHub App private key secret name
|
|
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
|
|
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38
|
|
id: release
|
|
with:
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
release-type: node
|
|
config-file: release-please-config.json
|
|
manifest-file: .release-please-manifest.json
|
|
outputs:
|
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
|
|
build-binaries:
|
|
name: Build (${{ matrix.target }})
|
|
runs-on: ubuntu-latest
|
|
needs: [release-please]
|
|
# TODO: Re-enable once Bun SDK compatibility is fixed
|
|
if: false
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 15
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- target: bun-linux-x64
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-linux-x64.tar.gz
|
|
- target: bun-linux-arm64
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-linux-arm64.tar.gz
|
|
- target: bun-linux-x64-musl
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-linux-x64-musl.tar.gz
|
|
- target: bun-linux-arm64-musl
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-linux-arm64-musl.tar.gz
|
|
- target: bun-darwin-x64
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-darwin-x64.zip
|
|
- target: bun-darwin-arm64
|
|
artifact: claude-agent-acp
|
|
archive: claude-agent-acp-darwin-arm64.zip
|
|
- target: bun-windows-x64
|
|
artifact: claude-agent-acp.exe
|
|
archive: claude-agent-acp-windows-x64.zip
|
|
- target: bun-windows-arm64
|
|
artifact: claude-agent-acp.exe
|
|
archive: claude-agent-acp-windows-arm64.zip
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Build binary
|
|
run: |
|
|
bun build src/index.ts \
|
|
--compile \
|
|
--target ${{ matrix.target }} \
|
|
--define 'process.env.CLAUDE_AGENT_ACP_IS_SINGLE_FILE_BUN="true"' \
|
|
--outfile ${{ matrix.artifact }}
|
|
|
|
- name: Compress binary
|
|
run: |
|
|
if [[ "${{ matrix.archive }}" == *.zip ]]; then
|
|
zip ${{ matrix.archive }} ${{ matrix.artifact }}
|
|
else
|
|
tar czf ${{ matrix.archive }} ${{ matrix.artifact }}
|
|
fi
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
|
with:
|
|
name: ${{ matrix.archive }}
|
|
path: ${{ matrix.archive }}
|
|
|
|
publish-npm:
|
|
name: Publish to npm
|
|
runs-on: ubuntu-latest
|
|
needs: [release-please]
|
|
if: ${{ needs.release-please.outputs.release_created }}
|
|
environment: release # Optional: for enhanced security
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
# Setup .npmrc file to publish to npm
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
|
|
with:
|
|
node-version: "lts/*"
|
|
registry-url: "https://registry.npmjs.org"
|
|
- name: Update npm
|
|
run: npm install -g npm@latest
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm publish
|
|
|
|
release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
needs: [publish-npm, release-please]
|
|
# TODO: Re-enable once Bun SDK compatibility is fixed
|
|
if: false
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: Upload artifacts
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release upload \
|
|
"${{ needs.release-please.outputs.tag_name }}" \
|
|
artifacts/* \
|
|
--clobber
|