diff --git a/.forgejo/workflows/release.yaml b/.forgejo/workflows/release.yaml index 2d9fa95..5844a10 100644 --- a/.forgejo/workflows/release.yaml +++ b/.forgejo/workflows/release.yaml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: alpine-1.20 + runs-on: debian steps: - name: Checkout source @@ -53,8 +53,13 @@ jobs: [ "$OS" = "windows" ] && BIN="${OUT}.exe" echo "🔨 Building $BIN" - - export CGO_ENABLED=1 + + # Disable CGO for cross-compiled targets (everything except native linux/amd64) + if [ "$TARGET" = "linux/amd64" ]; then + export CGO_ENABLED=1 + else + export CGO_ENABLED=0 + fi if [ "$ARCH" = "arm" ]; then case "$VARIANT" in @@ -70,6 +75,7 @@ jobs: fi echo "📦 Packaging $BIN with required files..." + PKG_DIR="bundle-$OUT" mkdir "$PKG_DIR" cp "$BIN" "$PKG_DIR/"