revert cli release

This commit is contained in:
dal 2025-09-10 10:54:33 -06:00
parent 50db4d25de
commit 44f9ae493b
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 113 additions and 152 deletions

View File

@ -17,181 +17,142 @@ permissions:
actions: read
jobs:
build-linux:
runs-on: blacksmith-2vcpu-ubuntu-2404
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: linux-x64
artifact_name: buster-cli-linux-x86_64.tar.gz
bun_target: linux-x64-modern
- os: macos-latest
target: darwin-x64
artifact_name: buster-cli-darwin-x86_64.tar.gz
bun_target: darwin-x64
- os: macos-latest
target: darwin-arm64
artifact_name: buster-cli-darwin-arm64.tar.gz
bun_target: darwin-arm64
- os: windows-2022
target: windows-x64
artifact_name: buster-cli-windows-x86_64.zip
bun_target: win32-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9.15.0
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: ./apps/cli
run: |
echo "📦 Installing CLI dependencies..."
bun install --frozen-lockfile
- name: Mount Turbo cache sticky disk
if: runner.os != 'Windows'
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-turbo-cache-cli-${{ matrix.target }}
path: ./.turbo
- name: Build Linux binary
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build dependencies with Turbo
run: |
echo "🔨 Building CLI dependencies with Turbo..."
pnpm turbo run build --filter=@buster-app/cli^...
env:
NODE_ENV: production
SKIP_ENV_CHECK: true
TURBO_CACHE_DIR: .turbo
TURBO_TELEMETRY_DISABLED: 1
- name: Build standalone CLI binary
working-directory: ./apps/cli
run: |
echo "📦 Building Linux x64 binary..."
mkdir -p dist
bun build src/index.tsx --compile --target=bun-linux-x64 --minify --outfile dist/buster-linux-x64
chmod +x dist/buster-linux-x64
echo "📦 Building standalone CLI binary for ${{ matrix.target }}..."
# Note: Bun compiles for the host platform, cross-compilation happens via matrix strategy
bun build src/index.tsx --compile --outfile dist/buster-cli
echo "🧪 Testing Linux binary..."
./dist/buster-linux-x64 --version || echo "Version command not implemented yet"
./dist/buster-linux-x64 --help || echo "Help command output"
# Make binary executable on Unix systems
if [[ "${{ runner.os }}" != "Windows" ]]; then
chmod +x dist/buster-cli
fi
# Display binary info
ls -lah dist/
shell: bash
- name: Package Linux binary
working-directory: ./apps/cli/dist
- name: Test binary (Unix)
if: runner.os != 'Windows'
working-directory: ./apps/cli
run: |
cp buster-linux-x64 buster
tar czf buster-cli-linux-x86_64.tar.gz buster
sha256sum buster-cli-linux-x86_64.tar.gz > buster-cli-linux-x86_64.tar.gz.sha256
ls -lah *.tar.gz *.sha256
echo "🧪 Testing CLI binary..."
./dist/buster-cli --version || echo "Version command not implemented yet"
./dist/buster-cli --help || echo "Help command output"
- name: Upload Linux artifacts
- name: Test binary (Windows)
if: runner.os == 'Windows'
working-directory: ./apps/cli
shell: pwsh
run: |
echo "🧪 Testing CLI binary..."
.\dist\buster-cli.exe --version
.\dist\buster-cli.exe --help
- name: Compress binary (Unix)
if: runner.os != 'Windows'
working-directory: ./apps/cli
run: |
cd dist
# Rename to just 'buster' for end users
mv buster-cli buster
tar czf ${{ matrix.artifact_name }} buster
if [[ "${{ runner.os }}" == "macOS" ]]; then
shasum -a 256 ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256
else
sha256sum ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256
fi
echo "📦 Archive created:"
ls -lah ${{ matrix.artifact_name }}*
- name: Compress binary (Windows)
if: runner.os == 'Windows'
working-directory: ./apps/cli
shell: pwsh
run: |
cd dist
# Rename to just 'buster.exe' for end users
Rename-Item -Path "buster-cli.exe" -NewName "buster.exe"
Compress-Archive -Path buster.exe -DestinationPath ${{ matrix.artifact_name }}
Get-FileHash -Algorithm SHA256 ${{ matrix.artifact_name }} | Select-Object -ExpandProperty Hash > "${{ matrix.artifact_name }}.sha256"
echo "📦 Archive created:"
Get-ChildItem ${{ matrix.artifact_name }}*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: buster-cli-linux-x64
name: buster-cli-${{ matrix.target }}
path: |
apps/cli/dist/buster-cli-linux-x86_64.tar.gz
apps/cli/dist/buster-cli-linux-x86_64.tar.gz.sha256
retention-days: 1
build-macos-x64:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: ./apps/cli
run: |
echo "📦 Installing CLI dependencies..."
bun install --frozen-lockfile
- name: Build macOS x64 binary
working-directory: ./apps/cli
run: |
echo "📦 Building macOS x64 (Intel) binary..."
mkdir -p dist
bun build src/index.tsx --compile --target=bun-darwin-x64 --minify --outfile dist/buster-darwin-x64
chmod +x dist/buster-darwin-x64
- name: Package macOS x64 binary
working-directory: ./apps/cli/dist
run: |
cp buster-darwin-x64 buster
tar czf buster-cli-darwin-x86_64.tar.gz buster
sha256sum buster-cli-darwin-x86_64.tar.gz > buster-cli-darwin-x86_64.tar.gz.sha256
ls -lah *.tar.gz *.sha256
- name: Upload macOS x64 artifacts
uses: actions/upload-artifact@v4
with:
name: buster-cli-darwin-x64
path: |
apps/cli/dist/buster-cli-darwin-x86_64.tar.gz
apps/cli/dist/buster-cli-darwin-x86_64.tar.gz.sha256
retention-days: 1
build-macos-arm64:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: ./apps/cli
run: |
echo "📦 Installing CLI dependencies..."
bun install --frozen-lockfile
- name: Build macOS ARM64 binary
working-directory: ./apps/cli
run: |
echo "📦 Building macOS ARM64 (Apple Silicon) binary..."
mkdir -p dist
bun build src/index.tsx --compile --target=bun-darwin-arm64 --minify --outfile dist/buster-darwin-arm64
chmod +x dist/buster-darwin-arm64
- name: Package macOS ARM64 binary
working-directory: ./apps/cli/dist
run: |
cp buster-darwin-arm64 buster
tar czf buster-cli-darwin-arm64.tar.gz buster
sha256sum buster-cli-darwin-arm64.tar.gz > buster-cli-darwin-arm64.tar.gz.sha256
ls -lah *.tar.gz *.sha256
- name: Upload macOS ARM64 artifacts
uses: actions/upload-artifact@v4
with:
name: buster-cli-darwin-arm64
path: |
apps/cli/dist/buster-cli-darwin-arm64.tar.gz
apps/cli/dist/buster-cli-darwin-arm64.tar.gz.sha256
retention-days: 1
build-windows:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: ./apps/cli
run: |
echo "📦 Installing CLI dependencies..."
bun install --frozen-lockfile
- name: Build Windows binary
working-directory: ./apps/cli
run: |
echo "📦 Building Windows x64 binary..."
mkdir -p dist
bun build src/index.tsx --compile --target=bun-windows-x64 --minify --outfile dist/buster-windows-x64.exe
- name: Package Windows binary
working-directory: ./apps/cli/dist
run: |
cp buster-windows-x64.exe buster.exe
zip buster-cli-windows-x86_64.zip buster.exe
sha256sum buster-cli-windows-x86_64.zip > buster-cli-windows-x86_64.zip.sha256
ls -lah *.zip *.sha256
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: buster-cli-windows-x64
path: |
apps/cli/dist/buster-cli-windows-x86_64.zip
apps/cli/dist/buster-cli-windows-x86_64.zip.sha256
apps/cli/dist/${{ matrix.artifact_name }}
apps/cli/dist/${{ matrix.artifact_name }}.sha256
retention-days: 1
release:
needs: [build-linux, build-macos-x64, build-macos-arm64, build-windows]
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2404
outputs:
cli_version: ${{ steps.get_version.outputs.version }}