Skip to content

Creating an Official Release

Filip Hrisafov edited this page Nov 4, 2023 · 10 revisions

Prerequisites

  • Installed tools:
    • an up-to-date Maven installation
    • an up-to-date JDK 11
    • gpg is installed, a signing key has been created and the ~/.m2/settings.xml contains the (encoded) credentials for oss.sonatype.org. See http://central.sonatype.org/pages/apache-maven.html for details.

Performing the Release

Use the following steps to create an official release:

  • Depending on what kind of machine you are using to perform the release. You might need to run export GPG_TTY=$(tty) source. This is needed for the setup with macOS Sierra 10.12.6
  • Checkout main branch
  • Run mvn clean release:prepare release:perform:
    • When prompted, enter the release version and the new SNAPSHOT version (for non-final releases, the new SNAPSHOT version is the same as the old SNAPSHOT version).
    • Depending on your GPG installation, you'll be somehow prompted for your GPG-Passphrase.
  • Once the build is finished, check the staging-repository on https://oss.sonatype.org and perhaps the artifacts created in ./target/checkout/distribution/target/mapstruct-*-dist/mapstruct-*/docs.
    • If you see any problems, drop the staging repository and git reset --hard HEAD~2 to drop the two version-change commits made by the release plugin and get tag -d release-version to delete the created git tag (Maven didn't push anything upstream, so you only need local operations here).
  • Everything is fine? Great!
    • "Close" and "Release" the staging repository. (The new version is usable within a couple of minutes, finding them through search.maven.org might take a couple of hours until the next indexing-cycle.)
    • git push the two commits and the tag (!) created by Maven to GitHub.
    • From ./target/checkout/distribution/target/, upload the zip, tar.gz and asc files to the GitHub release (and make it publicly visible).
  • Add the new version to the Migration-Notes wiki.
  • Checkout the main branch for mapstruct.org:
    • Add the generated docs from ./target/checkout/distribution/.../docs to the proper places below static/documentation. When overwriting the docs of a version, make sure to purge existing files below api/ to not leave any stale or renamed API docs there. Also make sure that you change the name of the mapstruct-reference-guide.html to index.html.
    • Update config.toml and content/documentation/reference-guide.md.
    • Write an announcement blog post containing all the relevant links :).
    • Check the generated docs and publish them to mapstruct.org
  • If this was a new final release, update the "Latest Stable Version" badge and the version strings in the examples in readme.md and push the changes to main (note: the "latest version" badge won't update before the search.maven.org index was updated).
  • Announce on Twitter and on the mapstruct-users Google group.
  • Celebrate! 🎉

And if something is wrong or missing or obsolete in this list, edit this page :).

Clone this wiki locally