Update release workflow documentation to reflect current best practices
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2025-04-14 21:38:37 +01:00
parent c5d3c7672c
commit c73964888b
2 changed files with 145 additions and 108 deletions

View File

@ -70,11 +70,11 @@ We follow [Semantic Versioning](https://semver.org/):
### Version Update Checklist
When updating the version number, always update these files:
1. `wp-fix-plugin-does-not-exist-notices.php` (Plugin header)
1. `wp-fix-plugin-does-not-exist-notices.php` (Plugin header and version parameter in Plugin class initialization)
2. `CHANGELOG.md` (Add new version section)
3. `readme.txt` (Stable tag and Changelog section)
4. `README.md` (Update Changelog section to match readme.txt)
5. Update `FPDEN_VERSION` constant in the main plugin file
5. Update any JavaScript files that contain version constants (e.g., `admin/js/version-fix.js`)
6. Update `languages/wp-fix-plugin-does-not-exist-notices.pot` (Project-Id-Version and POT-Creation-Date)
**IMPORTANT**: Always ensure README.md is kept in sync with readme.txt for consistency across platforms.
@ -106,50 +106,55 @@ Before creating a new release, verify the following:
### Release Process
1. Create a new branch for the version: `git checkout -b v{MAJOR}.{MINOR}.{PATCH}`
1. Create a new branch for the version: `git checkout -b v{MAJOR}.{MINOR}.{PATCH}` or use an existing feature branch
2. Update version numbers in ALL required files:
- `wp-fix-plugin-does-not-exist-notices.php` (Plugin header)
- `FPDEN_VERSION` constant in the main plugin file
- `readme.txt` (Stable tag)
- `README.md` (Ensure changelog is updated)
- `wp-fix-plugin-does-not-exist-notices.php` (Plugin header and version parameter in Plugin class initialization)
- `readme.txt` (Stable tag and Changelog section)
- `CHANGELOG.md` (Add new version section at the top)
- Any JavaScript files with version constants (e.g., `admin/js/version-fix.js`)
- `languages/wp-fix-plugin-does-not-exist-notices.pot` (Project-Id-Version)
- Any other files that reference the version number
3. Update CHANGELOG.md with all changes
4. Update readme.txt changelog section
5. Update README.md changelog section to match readme.txt
6. Commit changes: `git commit -m "Prepare release v{MAJOR}.{MINOR}.{PATCH}"`
7. Test changes locally on the version branch
8. When satisfied with testing, merge to main:
3. Run the build script to create the plugin ZIP file and deploy to local testing environment:
```
./build.sh {MAJOR}.{MINOR}.{PATCH}
```
4. Test the plugin thoroughly in the local WordPress environment
5. Commit changes: `git commit -m "Version {MAJOR}.{MINOR}.{PATCH} - Brief description of changes"`
6. Create a tag for the new version:
```
git tag -a v{MAJOR}.{MINOR}.{PATCH} -m "Version {MAJOR}.{MINOR}.{PATCH} - Brief description of changes"
```
7. Push the branch and tag to all remotes:
```
git push github feature/branch-name
git push gitea feature/branch-name
git push github v{MAJOR}.{MINOR}.{PATCH}
git push gitea v{MAJOR}.{MINOR}.{PATCH}
```
8. Verify the GitHub release is created with the ZIP file attached
9. When ready to merge to main, create a pull request or merge directly:
```
git checkout main
git merge v{MAJOR}.{MINOR}.{PATCH} --no-ff
```
9. Push main to all remotes:
```
git merge feature/branch-name --no-ff
git push github main
git push gitea main
```
10. Create and push a tag to trigger the GitHub Actions workflow:
```
git tag -a v{MAJOR}.{MINOR}.{PATCH} -m "Release version {MAJOR}.{MINOR}.{PATCH}"
git push github refs/tags/v{MAJOR}.{MINOR}.{PATCH}
git push gitea refs/tags/v{MAJOR}.{MINOR}.{PATCH}
```
11. Verify the GitHub Actions workflow completes successfully
## Build Process
The build process is handled by `build.sh`:
1. Updates version numbers
1. Creates build directory
2. Installs composer dependencies
3. Copies files to build directory
3. Copies required files to build directory
4. Creates ZIP file
5. Automatically deploys to local WordPress testing environment
To manually build the plugin:
To build the plugin and deploy to local testing:
```
./build.sh {MAJOR}.{MINOR}.{PATCH}
```
This will create a ZIP file named `wp-fix-plugin-does-not-exist-notices-{MAJOR}.{MINOR}.{PATCH}.zip` and deploy the plugin to your local WordPress testing environment.
## Remote Repositories
The plugin is hosted on multiple repositories:
@ -205,37 +210,43 @@ cd ~/Local/plugin-testing/app/public
### Creating a New Release
```
# 1. Create a new branch
git checkout main
git checkout -b v1.7.0
# 1. Start from a feature branch or create a new branch
git checkout feature/branch-name
# or
git checkout -b feature/new-feature-name
# 2. Update version numbers in ALL required files
# - wp-fix-plugin-does-not-exist-notices.php
# - wp-fix-plugin-does-not-exist-notices.php (header and class initialization)
# - CHANGELOG.md
# - readme.txt
# - README.md
# - readme.txt (Stable tag and Changelog section)
# - Any JavaScript files with version constants
# - languages/wp-fix-plugin-does-not-exist-notices.pot
# - FPDEN_VERSION constant
# 3. Commit changes
# 3. Build and test locally
./build.sh 1.7.0
# Test in local WordPress environment
# 4. Commit changes
git add .
git commit -m "Prepare release v1.7.0"
git commit -m "Version 1.7.0 - Brief description of changes"
# 4. Test changes locally on the version branch
# (Run tests, verify functionality)
# 5. Create a tag
git tag -a v1.7.0 -m "Version 1.7.0 - Brief description of changes"
# 5. Merge to main when ready
# 6. Push branch and tag to remotes
git push github feature/branch-name
git push gitea feature/branch-name
git push github v1.7.0
git push gitea v1.7.0
# 7. Verify GitHub release is created with ZIP file
# Check: https://github.com/wpallstars/wp-fix-plugin-does-not-exist-notices/releases
# 8. Merge to main when ready
git checkout main
git merge v1.7.0 --no-ff
# 6. Push main to remotes
git merge feature/branch-name --no-ff
git push github main
git push gitea main
# 7. Create and push tag
git tag -a v1.7.0 -m "Release version 1.7.0"
git push github refs/tags/v1.7.0
git push gitea refs/tags/v1.7.0
```
### Adding a New Feature