Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Add release smoke test and refine rsync excludes

Juan Denisf0ee3b2e3dfd
diff --git a/.github/workflows/release-smoke.yml b/.github/workflows/release-smoke.yml
new file mode 100644
index 00000000..f243d7e7
--- /dev/null
+++ b/.github/workflows/release-smoke.yml
@@ -0,0 +1,47 @@
+name: Release Build Smoke Test
+
+# Validates that the release tarball can be built successfully. This catches
+# release-script-specific issues (e.g. overly broad rsync excludes that omit
+# frontend source files) before they reach main, instead of failing late in the
+# release workflow.
+
+on:
+ push:
+ branches: [dev, main]
+ paths:
+ - 'frontend/**'
+ - 'backend/**'
+ - 'scripts/build-release.sh'
+ - '.github/workflows/release-smoke.yml'
+ - '.github/workflows/release.yml'
+ - 'VERSION'
+ pull_request:
+ branches: [dev, main]
+ paths:
+ - 'frontend/**'
+ - 'backend/**'
+ - 'scripts/build-release.sh'
+ - '.github/workflows/release-smoke.yml'
+ - '.github/workflows/release.yml'
+ - 'VERSION'
+
+jobs:
+ build-release-smoke:
+ name: Build release tarball
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install build dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3-venv python3-pip rsync
+
+ - name: Run release build script
+ run: bash scripts/build-release.sh
diff --git a/scripts/build-release.sh b/scripts/build-release.sh
index ad6b062d..6ae84aa2 100644
--- a/scripts/build-release.sh
+++ b/scripts/build-release.sh
@@ -67,7 +67,8 @@ mkdir -p "$BUILD_DIR"
step "Copying the source tree..."
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
rsync -a --exclude=.git --exclude=node_modules --exclude=venv --exclude=__pycache__ \
- --exclude=.pytest_cache --exclude=instance --exclude=dist --exclude=backups \
+ --exclude=.pytest_cache --exclude=instance --exclude=dist \
+ --exclude=/backups --exclude=/backend/instance/backups --exclude=/backend/dev-data/backups \
"$REPO_ROOT/" "$BUILD_DIR/"
# ---------------------------------------------------------------------------