Skip to content

Performing a release

ljacqu edited this page Aug 12, 2023 · 7 revisions

Note to self on how to release the project.

Release process

Preconditions

  • Java 8 is default version java -version
  • gpg command available on machine
  • gpg + Github SSH key known
  • Login details for ossrh repo and gpg key present in /.m2/settings.xml (must match repo ID of pom.xml)
  • Latest build successful (see GitHub actions)
  • Ensure that Javadoc can be generated without errors: mvn javadoc:javadoc
  • No local changes
  • Dependencies branch merged (or intentionally not)

Preparation

  • Clone new copy: git clone git@github.com:ljacqu/JavaTypeResolver.git javatypersv-release && cd jtresolver-release
    • If this fails (access denied), probably the SSH key for GitHub is not properly set up. Do not clone with the https URL as it may create issues in the releasing process later on!
  • Not releasing from master? Run git fetch && git switch other-branch, otherwise go to next point
  • Create new branch git checkout -b release && git push --set-upstream origin release
  • Check right Git author settings git config user.name && git config user.email
    • Otherwise change them with git config --global user.name ljacqu && git config --global user.email ljacqu@users.noreply.github.com

Prepare release

  • mvn release:prepare -P release
  • Use dryRun to test: mvn release:prepare -P release -DdryRun=true

If it failed:

  • mvn release:rollback -P release
  • delete remote branch: git push origin :<tag-name>
  • delete the release tag if it was created
  • delete the local checkout

Perform release

  • mvn release:perform -P release
  • merge release branch into master, delete release
  • delete project copy

Check release success

Project cleanup

  • Close GitHub milestone
  • Update version in README and add entry to changelog

Home

Documentation

  1. Array utils
  2. ClassUtils
  3. Number types

Internal (for development)

  1. Performing a release
  2. Terminology

Clone this wiki locally