Skip to content

Performing a release

ljacqu edited this page Oct 5, 2024 · 7 revisions

Note to self on how to release the project.

Release process

Preconditions

  • NumberTypesTest#shouldSupportAllJdkNumberTypes passes (must be run locally outside of Maven)
  • Java 8 is default version java -version
  • gpg command available on machine: whereis gpg
  • gpg + Github SSH key known (to check: ssh git@github.com)
  • 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 typeresolver-release && cd typeresolver-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
    • Specify tag name as v0.2.0 (for version 0.2.0)
  • 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
  • Create a release entry
  • 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