40 lines
3.1 KiB
Markdown
40 lines
3.1 KiB
Markdown
# Build and release eventLabs
|
|
|
|
Build from the plugin repository root with Git and Python 3.9 or newer:
|
|
|
|
```sh
|
|
python3 scripts/release.py
|
|
```
|
|
|
|
The script packages the committed files at `HEAD`. Pass a Git ref, such as `v0.5.2`, to build that revision instead. `dist/` contains `eventlabs-vX.Y.Z.zip` and `eventlabs-update.json`. The ZIP contains `burn-events/burn-events.php` and its runtime files so WordPress installs or replaces the existing plugin directory. The manifest records the version, WordPress and PHP requirements, source commit, ZIP size, and SHA-256.
|
|
|
|
To publish, update the `Version` header and `BURN_EVENTS_VERSION` together in `burn-events.php`, commit the release, and push a matching tag:
|
|
|
|
```sh
|
|
git push origin main
|
|
git tag vX.Y.Z
|
|
git push origin vX.Y.Z
|
|
```
|
|
|
|
The [Gitea release workflow](../.gitea/workflows/release.yml) runs on an `ubuntu-latest` runner with Git and Python 3. It builds the tagged commit, uploads both assets to a draft, then publishes and verifies the public downloads. The job uses Gitea's built-in token with release write access. Check the **Actions** tab for the result.
|
|
|
|
If a runner is unavailable, run the same release command after pushing the tag:
|
|
|
|
```sh
|
|
python3 scripts/release.py vX.Y.Z --publish
|
|
```
|
|
|
|
The command uses `EVENTLABS_RELEASE_TOKEN` if set, or your configured Git credentials for `git.labs.casa`. Keep credentials out of the repository and release files. If an upload stops partway through, rerun the command for the same tag to finish the draft. Publish changes to a new version rather than replacing an existing release ZIP.
|
|
|
|
The installed plugin uses WordPress's [external update hook](https://developer.wordpress.org/reference/hooks/update_plugins_hostname/) and Gitea's [latest stable release API](https://docs.gitea.com/api/operations/repo-get-latest-release/). WordPress downloads the attached ZIP over HTTPS and eventLabs verifies its size and checksum. Sites can use **Dashboard → Updates → Check again** to refresh the update list. WordPress's normal auto-update setting controls whether updates install automatically.
|
|
|
|
Keep the release downloads public for sites to receive updates without a Gitea account. Installations older than **0.5.2** need the first ZIP uploaded manually. Use a normal plugin installation to test the WordPress upgrade; the Docker development site's bind mount is updated through the Git checkout.
|
|
|
|
## Loop Builder add-on releases
|
|
|
|
Build the add-on from a committed revision with `python3 scripts/release.py --loop-builder`. The build writes a separate WordPress ZIP and `eventlabs-loop-builder-release.json` to `dist/`.
|
|
|
|
Update both version values in `addons/eventlabs-loop-builder/eventlabs-loop-builder.php`, commit the changes, then push `loop-builder-vX.Y.Z`. The [add-on workflow](../.gitea/workflows/loop-builder-release.yml) publishes its own ZIP and checksum manifest under that tag. Gitea marks add-on releases as pre-releases so WordPress's existing eventLabs core update feed continues to point to the latest core ZIP. Users install the add-on ZIP separately through WordPress.
|
|
|
|
To publish manually after pushing the tag, run `python3 scripts/release.py --loop-builder loop-builder-vX.Y.Z --publish`.
|