4.2 KiB
Release Process Guide for AI Assistants
This document outlines the process for preparing and publishing new releases of the WordPress Plugin Starter Template.
Release Workflow Overview
- Create a version branch
- Update version numbers in all required files
- Build and test the plugin
- Commit version changes
- Create version tags
- Push to remote repositories
- Merge into main branch
Detailed Steps
1. Create a Version Branch
Always start by creating a version branch from the latest main branch:
git checkout main
git pull origin main # Critical step - never skip this
git checkout -b v{MAJOR}.{MINOR}.{PATCH}
Example: git checkout -b v1.0.0
2. Update Version Numbers
Update version numbers in all required files:
-
Main plugin file (wp-plugin-starter-template.php):
- Update the
Version:
header - Update the version parameter in the Plugin class instantiation
- Update the
-
readme.txt:
- Update the
Stable tag:
value - Add a new section to the changelog
- Update the
-
README.md:
- Update version references
- Add new section to the changelog
-
CHANGELOG.md:
- Add a new version section at the top
-
languages/wp-plugin-starter-template.pot:
- Update the
Project-Id-Version
header
- Update the
3. Build and Test the Plugin
Build the plugin with the new version:
./build.sh {MAJOR}.{MINOR}.{PATCH}
This will:
- Create a clean build in the
build/
directory - Generate a ZIP file for distribution
- Deploy to a local WordPress installation if configured
Test the plugin thoroughly:
- Test with the latest WordPress version
- Test with the minimum supported WordPress version (5.0)
- Test with PHP 7.0+ (minimum supported version)
- Test all features and functionality
4. Commit Version Changes
Commit all version changes:
git add wp-plugin-starter-template.php readme.txt README.md CHANGELOG.md languages/wp-plugin-starter-template.pot
git commit -m "Version {MAJOR}.{MINOR}.{PATCH} - [brief description]"
5. Create Version Tags
Create version tags:
git tag -a v{MAJOR}.{MINOR}.{PATCH} -m "Version {MAJOR}.{MINOR}.{PATCH}"
git tag -a v{MAJOR}.{MINOR}.{PATCH}-stable -m "Stable version {MAJOR}.{MINOR}.{PATCH}"
The -stable
tag is used by Git Updater to identify the stable version.
6. Push to Remote Repositories
Push the version branch and tags to remote repositories:
# Push to GitHub
git push github refs/heads/v{MAJOR}.{MINOR}.{PATCH}:refs/heads/v{MAJOR}.{MINOR}.{PATCH}
git push github refs/tags/v{MAJOR}.{MINOR}.{PATCH}:refs/tags/v{MAJOR}.{MINOR}.{PATCH}
git push github refs/tags/v{MAJOR}.{MINOR}.{PATCH}-stable:refs/tags/v{MAJOR}.{MINOR}.{PATCH}-stable
# Push to Gitea
git push gitea refs/heads/v{MAJOR}.{MINOR}.{PATCH}:refs/heads/v{MAJOR}.{MINOR}.{PATCH}
git push gitea refs/tags/v{MAJOR}.{MINOR}.{PATCH}:refs/tags/v{MAJOR}.{MINOR}.{PATCH}
git push gitea refs/tags/v{MAJOR}.{MINOR}.{PATCH}-stable:refs/tags/v{MAJOR}.{MINOR}.{PATCH}-stable
7. Merge into Main Branch
Merge the version branch into the main branch:
git checkout main
git merge v{MAJOR}.{MINOR}.{PATCH} --no-ff -m "Merge v{MAJOR}.{MINOR}.{PATCH} into main"
git push github main
git push gitea main
Version Numbering Guidelines
Follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Incompatible API changes
- MINOR: Add functionality in a backward-compatible manner
- PATCH: Backward-compatible bug fixes
Examples:
- Bug fix: 1.0.0 → 1.0.1
- New feature: 1.0.0 → 1.1.0
- Breaking change: 1.0.0 → 2.0.0
GitHub Actions Workflow
When you push a tag, the GitHub Actions workflow will:
- Build the plugin
- Create a ZIP file
- Create a GitHub release
- Attach the ZIP file to the release
You can monitor the workflow in the "Actions" tab of the GitHub repository.
WordPress.org Deployment (If Applicable)
If the plugin is hosted on WordPress.org:
- Ensure the
readme.txt
file is properly formatted - Ensure the stable tag matches the new version
- Use the WordPress.org SVN repository to deploy the new version
Post-Release Tasks
After releasing a new version:
- Update the wiki documentation if needed
- Announce the release in relevant channels
- Monitor for any issues or feedback
- Start planning the next release