Instructions for a new major, new minor, or a patch when this would make it the latest version (e.g. 2.2.1 when latest version is 2.2.0)
Ensure you have the latest changes locally, and no uncommitted changes:
git pull --ff-only
git statusSet the version locally:
export RELEASE_VERSION=2.2.0
export NEXT_VERSION=2.2.1-SNAPSHOTUpdate the versions:
# Update version in pom
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSIONUpdate the docs (docs/quickstart.md and mkdocs.yml) to point to the new release version:
# "-i.bak" works with both GNU and BSD (macOS) sed, unlike a bare "-i".
sed -i.bak \
-e "s|<version>[^<]*</version>|<version>${RELEASE_VERSION}</version>|g" \
-e "s|mcp-bom:[^\"]*\"|mcp-bom:${RELEASE_VERSION}\"|g" \
docs/quickstart.md
rm docs/quickstart.md.bak
sed -i.bak "s|\(mcp-core/\)[0-9][^ ]*|\1${RELEASE_VERSION}|" mkdocs.yml
rm mkdocs.yml.bakCommit everything and tag:
git add pom.xml mkdocs.yml docs/quickstart.md "**/pom.xml"
git commit --signoff --message "Release version $RELEASE_VERSION"
git tag --annotate "v$RELEASE_VERSION" --message "Release version $RELEASE_VERSION"Review the commit and the tag (git show "v$RELEASE_VERSION"), then prepare the next version:
# Update version in pom
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$NEXT_VERSION
git add pom.xml "**/pom.xml"
git commit --signoff --message "Next development version"Review the commit (git show).
⚠️ Take a good review before pushing!
Then push it all:
git push --tags origin HEADThen release from the "Release to Maven Central" action. Click "Run workflow", choose the newly pushed tag, then "run workflow".
Create release notes.