Add plugin zip build task and CI release artifact #12

Merged
thatguygriff merged 1 commits from feature/build-and-release into main 2026-06-05 14:54:13 +00:00
Owner

Adds a local build task and a CI artifact build on merge to main.

Local build — composer build

Runs bin/build-zip.sh, producing dist/<slug>-<version>.zip ready to upload via wp-admin → Plugins → Add New → Upload Plugin.

  • Single top-level unsupervised-schedular/ folder
  • Ships runtime only: main file, uninstall.php, src/, templates/, assets/, plus a production (no-dev) optimized Composer autoloader
  • Excludes tests/, docs/, composer.json, tooling configs, and all dev dependencies
  • Version is read from the plugin header, so the zip name tracks releases

Verified: 27 plugin classes present in the optimized classmap; dev deps and test/config files confirmed absent.

CI artifact on merge to main

New build job in .gitea/workflows/ci.yml:

  • Runs only on push to main (i.e. after a merge)
  • needs: [lint, static-analysis, test, no-debug] — builds only once quality gates pass
  • Runs composer build and uploads dist/*.zip via actions/upload-artifact@v3, named unsupervised-schedular-<version>

Also ignores build/ and dist/.

Caveats

  • Assumes the Gitea runner image has zip (catthehacker ubuntu-latest does) and that Actions artifacts are enabled on the instance. If artifacts are disabled, we can switch to attaching the zip to a Gitea release on tag push instead.

🤖 Generated with Claude Code

Adds a local build task and a CI artifact build on merge to `main`. ## Local build — `composer build` Runs `bin/build-zip.sh`, producing `dist/<slug>-<version>.zip` ready to upload via **wp-admin → Plugins → Add New → Upload Plugin**. - Single top-level `unsupervised-schedular/` folder - Ships runtime only: main file, `uninstall.php`, `src/`, `templates/`, `assets/`, plus a **production (no-dev) optimized** Composer autoloader - Excludes `tests/`, `docs/`, `composer.json`, tooling configs, and all dev dependencies - Version is read from the plugin header, so the zip name tracks releases Verified: 27 plugin classes present in the optimized classmap; dev deps and test/config files confirmed absent. ## CI artifact on merge to main New `build` job in `.gitea/workflows/ci.yml`: - Runs only on **push to `main`** (i.e. after a merge) - `needs: [lint, static-analysis, test, no-debug]` — builds only once quality gates pass - Runs `composer build` and uploads `dist/*.zip` via `actions/upload-artifact@v3`, named `unsupervised-schedular-<version>` Also ignores `build/` and `dist/`. ## Caveats - Assumes the Gitea runner image has `zip` (catthehacker `ubuntu-latest` does) and that **Actions artifacts are enabled** on the instance. If artifacts are disabled, we can switch to attaching the zip to a Gitea release on tag push instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thatguygriff added 1 commit 2026-06-05 14:45:09 +00:00
Add plugin zip build task and CI release artifact
CI / Coding Standards (pull_request) Successful in 52s
CI / PHPStan (pull_request) Successful in 1m1s
CI / Tests (PHP 8.1) (pull_request) Successful in 52s
CI / Tests (PHP 8.2) (pull_request) Successful in 48s
CI / Tests (PHP 8.3) (pull_request) Successful in 47s
CI / No Debug Code (pull_request) Successful in 3s
CI / Build Plugin Zip (pull_request) Has been skipped
e9d6c189bc
- bin/build-zip.sh + `composer build`: stage runtime files only, generate a
  production (no-dev) optimized autoloader, and emit
  dist/<slug>-<version>.zip with a single top-level plugin folder, ready to
  upload via wp-admin. Tests, tooling configs, docs, and dev dependencies
  are excluded; version is read from the plugin header.
- CI `build` job: on push to main (post-merge), after lint/static-analysis/
  test/no-debug pass, runs the build and uploads the zip via
  actions/upload-artifact.
- Ignore build/ and dist/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
thatguygriff merged commit 0b0dfe8f1c into main 2026-06-05 14:54:13 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#12