48 lines
No EOL
1.5 KiB
YAML
48 lines
No EOL
1.5 KiB
YAML
name: Build and Upload Canary
|
|
on:
|
|
# Allows you to run this manually from the Forgejo UI
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: node:20
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
# 1. FIX: Install system dependencies BEFORE setup-bun
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y unzip libstdc++6 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2
|
|
|
|
- name: Manual Bun Install
|
|
run: |
|
|
# Download and install via official script
|
|
curl -fsSL https://bun.sh/install | bash
|
|
|
|
# Manually add Bun to the PATH for subsequent steps
|
|
echo "BUN_INSTALL=$HOME/.bun" >> $GITHUB_ENV
|
|
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
|
|
|
# Force execution permissions just in case
|
|
chmod +x $HOME/.bun/bin/bun
|
|
|
|
# Verify it works immediately
|
|
$HOME/.bun/bin/bun --version
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Build Canary
|
|
run: bun run build:canary
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canary-build
|
|
# Replace 'dist' with your actual output folder (e.g., 'out' or 'build')
|
|
path: artifacts/
|
|
retention-days: 7 |