- Node.js and npm installed on your system
- WordPress
- Clone the repository
- Navigate to the plugin directory
- Run
nvm useto switch to the right node version - Run
npm installto install dependencies
The following npm scripts are available for development:
npm run start- Watches for file changes and automatically recompiles assetsnpm run build- Compiles assets for production with optimizations
- For development, run
npm run startto automatically compile assets when files change - For production builds, run
npm run buildto generate optimized assets
Build plugin files
npm run buildUpdate version number in:
- Main plugin file header
- readme.txt
- Any constants in your code
Update changelog in readme.txt
Commit changes:
git add .
git commit -m "Prepare release v1.2.3"
git tag 1.2.3 # Replace with your current tag
git push origin 1.2.3 # Replace with your current tagAlso do git push so that the main repo will be up to date. This will not run the deploy workflow, so don’t worry
git pushIf the re-run option doesn't work, you can delete and re-push the same tag:
# Delete the tag locally
git tag -d 1.2.3 # Replace with your current tag
# Delete the tag on GitHub
git push origin :refs/tags/1.2.3 # Replace with your current tag
# Create the tag again
git tag 1.2.3 # Replace with your current tag
# Push the tag again
git push origin 1.2.3 # Replace with your current tag