Release and deployment model
Source of truth
The bcgov/wordpress-monorepo repository (this monorepo) is the source of truth for code, history, and automation. Day-to-day development happens on branches; releases are cut from tagged commits.
How consumers get packages today
- A maintainer pushes a namespaced tag (see Versioning):
<nx-project-name>/v<semver>. tag.ymlbuilds the project, attachesdist.zipto a GitHub Release on this repository, and updates the Composer package indexpackages.jsonpublished to GitHub Pages athttps://bcgov.github.io/wordpress-monorepo/.- Downstream WordPress stacks add the Composer repository URL and
requirethe package by name and version.
The packages.json entries point dist.url at the release asset on this GitHub repo (update-packages.php uses github.com/<repository>/releases/download/...).
Release flow (high level)
- Developers merge work to
mainvia pull request. - A maintainer pushes a namespaced version tag for the Nx project being released.
tag.ymlbuilds that project, publishesdist.zipon a GitHub Release, and updatespackages.jsonon GitHub Pages.
Manual vs automated steps
| Step | Usually |
|---|---|
| Code review and merge | Manual |
| Choosing version and pushing tag | Manual (maintainer) |
Build, zip, GitHub Release, packages.json deploy | Automated in tag.yml |
Composer consumer configuration
Example (adjust package name and version):
json
{
"repositories": [
{
"type": "composer",
"url": "https://bcgov.github.io/wordpress-monorepo"
}
],
"require": {
"bcgov-plugin/bcgov-wordpress-blocks": "^1.0"
}
}