Creating an Official Release
Filip Hrisafov edited this page Nov 4, 2023
·
10 revisions
- 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 foross.sonatype.org
. See http://central.sonatype.org/pages/apache-maven.html for details.
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 andget tag -d release-version
to delete the created git tag (Maven didn't push anything upstream, so you only need local operations here).
- If you see any problems, drop the staging repository and
- 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 thezip
,tar.gz
andasc
files to the GitHub release (and make it publicly visible).
- Add the new version to the Migration-Notes wiki.
- Checkout the
main
branch formapstruct.org
:- Add the generated docs from
./target/checkout/distribution/.../docs
to the proper places belowstatic/documentation
. When overwriting the docs of a version, make sure to purge existing files belowapi/
to not leave any stale or renamed API docs there. Also make sure that you change the name of themapstruct-reference-guide.html
toindex.html
. - Update
config.toml
andcontent/documentation/reference-guide.md
. - Write an announcement blog post containing all the relevant links :).
- Check the generated docs and publish them to mapstruct.org
- Add the generated docs from
- 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 :).