Release Process
Versioning
Aegis follows semantic versioning (SemVer):
| Type | Format | When |
|---|---|---|
| Patch | 1.0.x | Bug fixes, documentation updates |
| Minor | 1.x.0 | New features, backwards compatible |
| Major | x.0.0 | Breaking changes, major rewrites |
Release Workflow
- Feature development — Work happens on feature branches.
-
Pull request — Submit PR to
developbranch. - Code review — PR is reviewed by maintainers.
- CI passes — All tests, linting, and checks must pass.
- Merge to develop — PR is merged into the development branch.
-
Release preparation — When ready,
developis merged tomain. -
Version bump — Update version numbers in
style.css,package.json, andreadme.txt, and updateCHANGELOG.md. -
Tag — Push a tag in the form
v1.2.3(orv1.2.3-rc1). -
Automated build — The tag starts the release workflow (
release.yml), which builds and uploads the package (see below). - Publish — Review the draft release on GitHub and publish it. Sites update only after the release is published.
The Aegis Dash is released separately from its own repository.
The Release Workflow (release.yml)
Pushing a v* tag runs Release Aegis Theme:
- Checks that the tag is semantic (
v1.2.3orv1.2.3-rc1). - Runs
npm ciandnpm run build(Node 20). - Installs Composer dependencies with dev packages (PHP 8.3) and runs
npm run lint:js,npm run lint:css,vendor/bin/phpcs, andcomposer validate --strict. - Reinstalls Composer dependencies with
--no-dev --optimize-autoloader. - Copies the theme into an
aegis/folder withrsync, skipping everything in.distignore. - Checks that
aegis/style.css,functions.php,vendor/autoload.php,screenshot.png, andsrc/Blocks/exist, and thattools/,vendor/aegis/wpaudit/,languages/, andLICENSEare not in the package. - Zips it as
aegis.zip(the zip’s root folder isaegis/) and writesaegis.zip.sha256. - Creates a draft GitHub release with both files attached and generated release notes.
The theme’s GitHub updater installs the aegis.zip asset from the latest published release, so a draft is never offered to sites. Keep the asset name aegis.zip and the aegis/ root folder: the updater and the upload installer both rely on them. See Updating.
Holding a release until Aegis Dash is ready
If a theme release needs a newer Aegis Dash, add a line like this to the release notes before publishing:
Copied!MarkdownRequires Aegis Dash: 1.1.0
Sites whose Aegis Dash is missing, inactive or older than that version are not offered the update, and an admin notice explains why. The updater reads the running plugin’s version, so it does not matter what the plugin folder is called. is accepted as well.
Building a Release Package Locally
There is no npm run package script. To reproduce the workflow’s package on your machine:
Copied!Shell# Ensure clean stategit checkout maingit pull origin main# Build assets and install production dependenciesnpm cinpm run buildcomposer install --no-dev --optimize-autoloader# Copy into an aegis/ folder, skipping .distignore entries, then zip itrsync -am ./ aegis/ --exclude-from='.distignore'zip -r aegis.zip aegis
.distignore keeps these out of the package, among others:
-
node_modules/,tests/,.git/, and CI configuration -
docs/,tools/,build/,languages/, andLICENSE - Build configuration (
package.json,webpack.config.js,composer.json,phpcs.xml) - TypeScript and SCSS sources and source maps in
src/Blocks/ - Development-only Composer packages in
vendor/
Server Deployment
Requirements
| Requirement | Details |
|---|---|
| PHP | 8.1 or later |
| WordPress | 7.0 or later |
vendor/ directory | Must be present (Composer production dependencies) |
| Compiled block assets | Must be present in src/Blocks/ (built by npm run build) |
Deployment via Upload
- Download the release
aegis.zip. - Upload through Appearance → Themes → Add New → Upload.
- Activate the theme.
Deployment via Git
For servers with Git access:
Copied!Shellcd wp-content/themes/aegisgit fetch origingit checkout v1.0.0 # specific release tagcomposer install --no-dev --optimize-autoloader
Note
Running npm run build on the server is not recommended. Always deploy pre-built assets.
Deployment via CI/CD
Automated deployment pipeline example:
Copied!CI/CDdeploy: steps: - checkout code - composer install --no-dev --optimize-autoloader - npm ci - npm run build - rsync to production (excluding dev files) - clear caches
Files to Deploy
| Include | Exclude |
|---|---|
src/ (PHP, plus compiled block JS/CSS and block.json in src/Blocks/) | node_modules/ |
vendor/ (no-dev) | tests/ |
assets/ (fonts, icons, images) | .git/, CI configuration |
parts/ | build/, tools/, docs/ |
patterns/ | webpack.config.js, eslint.config.cjs, tsconfig.json |
styles/ | phpcs.xml |
templates/ | composer.json, composer.lock, package.json |
theme.json, style.css, functions.php, index.php, embed-content.php, screenshot.png, readme.txt | .wp-env.json, .editorconfig |
.distignore is the full exclusion list.
Deployment Checklist
Before deploying to production:
- [ ] All tests pass.
- [ ] Build completes without errors.
- [ ] Version numbers are updated.
- [ ] Changelog is updated.
- [ ]
composer install --no-dev(no development packages). - [ ]
npm run build(production build, notbuild:dev). - [ ] No source maps in production (unless intentional).
- [ ] Backup the production site.
Post-Deployment
After deploying a new version:
- Clear caches — Purge page cache, object cache, and CDN cache.
- Verify the site — Check the homepage, key pages, and WooCommerce.
- Check the error log — Look for any new PHP errors or warnings.
- Test critical paths — Complete a test purchase (if WooCommerce), submit a form.
- Run a Lighthouse audit — Ensure performance did not regress.
Rollback Procedure
If a deployment causes issues:
Via Theme Upload
- Download the
aegis.zipof the previous release. - Upload and activate the previous version.
Via Git
Copied!Shellcd wp-content/themes/aegisgit checkout v1.0.0-previous # previous release tagcomposer install --no-dev --optimize-autoloader
Via Backup
Restore the full site backup taken before deployment.
Environment-Specific Configuration
Development
Copied!PHPdefine( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true );define( 'SCRIPT_DEBUG', true );
Staging
Copied!PHPdefine( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true );define( 'SCRIPT_DEBUG', false );
Production
Copied!PHPdefine( 'WP_DEBUG', false );define( 'SCRIPT_DEBUG', false );
CDN Considerations
When using a CDN:
- Ensure the CDN serves the theme’s
src/Blocks/,vendor/aegis/*/public/, andassets/files. - Set appropriate cache headers for versioned assets (long TTL).
- Purge CDN cache after deployment.
- Fonts and images should be served via CDN for performance.
Next Steps
- Contributing — How to contribute changes.
- Building Assets — Understanding the build output.
- Performance — Post-deployment performance verification.
- Common Issues — Troubleshooting deployment problems.