Skip to content
Closed
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
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ on:
branches: [main]

jobs:
workflow-lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Check workflow files
run: bun run lint:workflow

ci:
runs-on: macos-latest

Expand All @@ -15,7 +31,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: macos-14
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Test
run: bun test

- name: Build
run: bun run build

- name: Package release artifacts
env:
RELEASE_VERSION: ${{ github.ref_name }}
run: bun run scripts/package-release.ts

- name: Upload release assets
id: upload_release
uses: softprops/action-gh-release@v2
with:
files: |
release/*.tar.gz
release/SHA256SUMS
release/manifest.json
packaging/homebrew/claude-code-best.rb

- name: Write release summary
if: always()
env:
RELEASE_URL: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
run: |
node <<'EOF'
const fs = require('fs')
const manifest = JSON.parse(fs.readFileSync('release/manifest.json', 'utf8'))
const lines = [
'## Release published',
'',
`- tag: ${{ github.ref_name }}`,
`- release url: ${process.env.RELEASE_URL}`,
'- assets:',
...manifest.artifacts.map(name => ` - ${name}`),
` - ${manifest.checksumsFile}`,
' - manifest.json',
` - ${manifest.formulaFile}`,
'',
'Homebrew tap sync will be triggered separately by the release published event.',
'Check the Sync Homebrew Tap workflow for downstream PR, auto-merge, and recovery status.',
'',
]
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${lines.join('\n')}\n`)
EOF
Loading