Connect the GitHub repository to the WordPress Plugin Directory SVN and automate deployment via GitHub Actions.
WordPress Plugin Directory SVN should not include development files. Create a .svnignore (used by the deploy action) to exclude:
.git
.gitignore
.github
node_modules
src
webpack.config.js
package.json
package-lock.json
PLAN.md
RELEASE_CHECKLIST.md
README.md
The deploy action will use this to build a clean SVN commit from only the distributable files.
The WordPress SVN repo for this plugin lives at:
https://plugins.svn.wordpress.org/add-whatsapp-button/
It has three directories:
trunk/— the latest version (auto-synced from the GitHubmasterbranch on deploy)tags/— one subfolder per release (e.g.tags/2.1.8/), which is what WordPress serves to usersassets/— plugin page assets (banner, icon, screenshots) — not included in the plugin zip
In the GitHub repository settings, add two repository secrets:
SVN_USERNAME— your WordPress.org usernameSVN_PASSWORD— your WordPress.org password (or application password)
Use the 10up/action-wordpress-plugin-deploy action — the de facto standard for this workflow.
The workflow should:
- Trigger on a push to
masteronly when a version tag is pushed (e.g.,v2.1.8) - Run
npm install && npm run buildto compile JS assets before deploying - Deploy the compiled plugin to WordPress SVN (
trunk/and a newtags/<version>/)
The version number is read automatically from the Version: header in add-whatsapp-button.php.
.github/workflows/deploy.yml
| File | Purpose |
|---|---|
.svnignore |
Tells deploy action which files to exclude from SVN |
.github/workflows/deploy.yml |
GitHub Actions deploy workflow |
RELEASE_CHECKLIST.md |
Pre-release checklist (already created) |
- Confirm your WordPress.org account has commit access to
add-whatsapp-buttonin the plugin directory. - Add
SVN_USERNAMEandSVN_PASSWORDsecrets in GitHub → Settings → Secrets and variables → Actions. - Verify the plugin slug in
deploy.ymlmatches the directory name on WordPress SVN (add-whatsapp-button). - Test by pushing a version tag (e.g.,
git tag v2.1.8 && git push origin v2.1.8).
- Complete all items in
RELEASE_CHECKLIST.md. - Commit and push changes to
master. - Push a version tag:
git tag v<version> && git push origin v<version>. - GitHub Actions builds assets and deploys to WordPress SVN automatically.
- Check the Actions tab on GitHub for deploy status.
- Verify the new version appears on
https://wordpress.org/plugins/add-whatsapp-button/.
- The
readme.txtandadd-whatsapp-button.phpVersion:header must match — the deploy action reads the version from the PHP file and creates the SVN tag accordingly. - The
js/folder is in.gitignore(compiled output). The deploy action runs the build step so compiled assets are included in SVN even though they are not committed to Git. Confirm this is handled in the workflow's build step. assets/on SVN (banners, icons, screenshots) is managed separately and is not overwritten by the deploy action unless you configure it to do so.