This document outlines the process for creating new releases of the WordPress ActivityPub plugin. The process differs slightly between major/minor releases and patch releases.
Major and minor releases follow the same release process. These releases are created from the trunk branch.
-
Generate Version Bump PR
- Use the release script to automatically generate a version bump pull request:
# From the plugin root directory npm run release - The script will:
- Determine the new version number based on the unreleased changelog entries.
- Update version numbers in relevant files
- Update
CHANGELOG.mdandreadme.txtwith the changelog entries - Create a new branch
- Commit changes
- Push to GitHub
- Create a pull request
- Use the release script to automatically generate a version bump pull request:
-
Review and Merge
- Review the generated PR to ensure all version numbers and changelog entries are correct.
- Once approved, merge the PR into
trunk.
-
Create Release
- On GitHub, navigate to the main page of the repository.
- To the right of the list of files, click Releases.
- At the top of the page, click Draft a new release.
- To choose a tag for the release, select the Choose a tag dropdown menu.
- Type the version number for your release, then click Create new tag.
- Select the Target dropdown menu, then click
trunk. - Select the Previous tag dropdown menu, then click the tag that identifies the previous release.
- Above the description field, click Generate release notes.
- If you're ready to publicize your release, click Publish release.

Patch releases require a more manual process as they need to be created from the previous release branch.
-
Restore Release Branch
- Locate the most recent release branch (for
5.3.0it wasrelease/5.3.0, created via #1371). - Click "Restore branch" to recreate it.
- Locally, checkout that release branch you just restored:
git fetch origin release/5.3.0 && git checkout release/5.3.0
- Locate the most recent release branch (for
-
Cherry-pick Changes into the release branch
- Identify merge commits from
trunkthat need to be included. You can find them at the bottom of each PR:
- Identify merge commits from
-
Cherry-pick each merge commit into this branch:
# Checkout the release branch. git checkout release/5.3.0 # Cherry-pick a merge commit. git cherry-pick -m 1 <commit-hash>
Note: The
-m 1flag is required when cherry-picking merge commits. Merge commits have two parent commits - the first parent (-m 1) is the target branch of the original merge (usually the main branch), and the second parent (-m 2) is the source branch that was being merged. We use-m 1to tell Git to use the changes as they appeared in the main branch. -
Resolve merge conflicts that may come up as you cherry-pick commits.
-
Update changelog and version numbers
- Run
composer changelog:write. It will updateCHANGELOG.mdwith the changelog entries you cherry-picked, and will give you a version number for that release. - Edit
readme.txtto paste the changelog entries fromCHANGELOG.mdinto the== Changelog ==section. - The release script doesn't support releasing patch versions, so you'll need to manually update version numbers in the different files (
activitypub.php,readme.txt, and files that may have been changed to introduce anunreleasedtext).
- Run
-
Review and push your changes
- Review your changes locally, and
git pushto push your changes to the remote.
- Review your changes locally, and
-
Create Release
- On GitHub, navigate to the main page of the repository.
- To the right of the list of files, click Releases.
- At the top of the page, click Draft a new release.
- To choose a tag for the release, select the Choose a tag dropdown menu.
- Type the version number for your release, then click Create new tag.
- Select the Target dropdown menu, then click the branch that contains the patches you want to release.
- Select the Previous tag dropdown menu, then click the tag that identifies the previous release.
- Above the description field, click Generate release notes.
- If you're ready to publicize your release, click Publish release.
