Package Exports
- wp-release-automation
- wp-release-automation/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wp-release-automation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
WordPress Release Automation
A comprehensive CLI tool for automating WordPress plugin and theme release processes with version management, ZIP creation, and Git integration.
Features
- 🔄 Version Management: Automated version bumping across multiple files
- 📦 ZIP Creation: WordPress-ready distribution packages
- 🏷️ Git Integration: Automatic commits, tagging, and pushing
- ⚙️ Configurable: Flexible configuration for different project needs
- 🚀 Complete Workflow: From version bump to GitHub release
- 📝 WordPress Standards: Follows WordPress plugin/theme conventions
Installation
Global Installation (Recommended)
npm install -g wp-release-automationLocal Installation
npm install --save-dev wp-release-automationQuick Start
Initialize your project:
cd your-wordpress-plugin wp-release initBump version and release:
npm run version:patch npm run publish
Your WordPress-ready ZIP file is created and pushed to GitHub!
CLI Commands
Initialize Project
wp-release initSets up configuration and package.json scripts for your WordPress project.
Version Management
wp-release version --type patch|minor|majorBuild Process
wp-release buildUpdates version numbers across all configured files.
Create Distribution ZIP
wp-release zipCreates a WordPress-ready ZIP file for distribution.
Complete Release
wp-release release --type patch|minor|majorFull release process: version bump → build → ZIP → Git tag.
Publish to GitHub
wp-release publish --type patch|minor|majorComplete release with push to GitHub.
NPM Scripts
After initialization, these scripts are available in your project:
# Version management
npm run version:patch # 1.0.0 → 1.0.1
npm run version:minor # 1.0.0 → 1.1.0
npm run version:major # 1.0.0 → 2.0.0
# Build and package
npm run build # Update versions across files
npm run zip # Create distribution ZIP
# Git operations
npm run git:tag # Create Git tag
npm run git:push # Push to GitHub
# Complete workflows
npm run release # Build → ZIP → Tag
npm run publish # Release → Push to GitHubConfiguration
The wp-release init command creates a wp-release.config.js file:
module.exports = {
"pluginName": "my-plugin",
"mainFile": "my-plugin.php",
"buildDir": "build",
"zipName": "{{name}}-{{version}}.zip",
"excludePatterns": [
"node_modules/",
".git/",
"src/",
"*.log",
".env*",
"tests/",
"*.md"
],
"config": {
"includeGitOps": true,
"tagPrefix": "v",
"branch": "main"
}
};Workflow Examples
Simple Release
# Bump patch version and release
npm run version:patch
npm run publishStep by Step
# 1. Bump version
npm run version:minor
# 2. Update files and create ZIP
npm run build
npm run zip
# 3. Git operations
npm run git:tag
npm run git:pushUsing CLI Directly
# One command release
wp-release publish --type patch
# Dry run to see what would happen
wp-release release --type minor --dry-runFile Structure
After initialization, your project will have:
your-plugin/
├── package.json # NPM scripts added
├── wp-release.config.js # Configuration
├── your-plugin.php # Version updated automatically
├── README.md # Version updated automatically
└── your-plugin-1.0.0.zip # Distribution ZIP createdVersion Updates
The tool automatically updates version numbers in:
- WordPress Plugin Headers:
* Version: 1.0.0 - Plugin Constants:
define('PLUGIN_VERSION', '1.0.0') - README.md: Version headers and stable tags
- package.json: NPM version
Git Integration
When Git operations are enabled:
- Automatic commits with descriptive messages
- Git tags with release notes
- Push to GitHub with tags
- Release-ready for GitHub Releases
Advanced Usage
Custom Scripts
Add to your package.json:
{
"scripts": {
"pre-release": "npm run test && npm run lint",
"release:beta": "npm run version:patch && npm run build && npm run zip",
"deploy": "npm run publish && echo 'Released!'"
}
}Hooks
Configure hooks in wp-release.config.js:
module.exports = {
// ...other config
"hooks": {
"preRelease": ["npm run test"],
"postRelease": ["echo 'Release complete!'"],
"preBuild": ["npm run compile"],
"postBuild": ["npm run optimize"]
}
};Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT
Support
- Issues: GitHub Issues
- Documentation: GitHub Wiki
Made for WordPress developers who want professional release automation 🚀