mirror of https://github.com/buster-so/buster.git
revert cli release
This commit is contained in:
parent
85f35ccf8d
commit
37ef822969
|
@ -17,181 +17,142 @@ permissions:
|
||||||
actions: read
|
actions: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build:
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
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:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Mount Turbo cache sticky disk
|
||||||
working-directory: ./apps/cli
|
if: runner.os != 'Windows'
|
||||||
run: |
|
uses: useblacksmith/stickydisk@v1
|
||||||
echo "📦 Installing CLI dependencies..."
|
with:
|
||||||
bun install --frozen-lockfile
|
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
|
working-directory: ./apps/cli
|
||||||
run: |
|
run: |
|
||||||
echo "📦 Building Linux x64 binary..."
|
echo "📦 Building standalone CLI binary for ${{ matrix.target }}..."
|
||||||
mkdir -p dist
|
# Note: Bun compiles for the host platform, cross-compilation happens via matrix strategy
|
||||||
bun build src/index.tsx --compile --target=bun-linux-x64 --minify --outfile dist/buster-linux-x64
|
bun build src/index.tsx --compile --outfile dist/buster-cli
|
||||||
chmod +x dist/buster-linux-x64
|
|
||||||
|
|
||||||
echo "🧪 Testing Linux binary..."
|
# Make binary executable on Unix systems
|
||||||
./dist/buster-linux-x64 --version || echo "Version command not implemented yet"
|
if [[ "${{ runner.os }}" != "Windows" ]]; then
|
||||||
./dist/buster-linux-x64 --help || echo "Help command output"
|
chmod +x dist/buster-cli
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Display binary info
|
||||||
|
ls -lah dist/
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Package Linux binary
|
- name: Test binary (Unix)
|
||||||
working-directory: ./apps/cli/dist
|
if: runner.os != 'Windows'
|
||||||
|
working-directory: ./apps/cli
|
||||||
run: |
|
run: |
|
||||||
cp buster-linux-x64 buster
|
echo "🧪 Testing CLI binary..."
|
||||||
tar czf buster-cli-linux-x86_64.tar.gz buster
|
./dist/buster-cli --version || echo "Version command not implemented yet"
|
||||||
sha256sum buster-cli-linux-x86_64.tar.gz > buster-cli-linux-x86_64.tar.gz.sha256
|
./dist/buster-cli --help || echo "Help command output"
|
||||||
ls -lah *.tar.gz *.sha256
|
|
||||||
|
|
||||||
- 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
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: buster-cli-linux-x64
|
name: buster-cli-${{ matrix.target }}
|
||||||
path: |
|
path: |
|
||||||
apps/cli/dist/buster-cli-linux-x86_64.tar.gz
|
apps/cli/dist/${{ matrix.artifact_name }}
|
||||||
apps/cli/dist/buster-cli-linux-x86_64.tar.gz.sha256
|
apps/cli/dist/${{ matrix.artifact_name }}.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
|
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build-linux, build-macos-x64, build-macos-arm64, build-windows]
|
needs: build
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
outputs:
|
outputs:
|
||||||
cli_version: ${{ steps.get_version.outputs.version }}
|
cli_version: ${{ steps.get_version.outputs.version }}
|
||||||
|
|
Loading…
Reference in New Issue