Skip to content

Release Process

Artur Souza edited this page Jul 15, 2020 · 40 revisions

Release by GitHub Actions

  1. Latest build in master branch
    • maven pom version includes -SNAPSHOT suffix
    • Push snapshot package to nexus repository
  2. Release Candidate build in release-X.Y branch
    • maven pom version includes X.Y.Z-rc-W suffix
    • tagging vX.Y.Z-rc-W triggers build to publish X.Y.Z-rc-W to nexus snapshot repository
  3. Release build in release-X.Y branch
    • maven pom version MUST NOT have any suffix
    • tagging vX.Y.Z triggers build to publish X.Y.Z to nexus central repository

Release steps

  1. Optionally, release a beta version.
# Set the two environment variables below.
export DAPR_JAVA_SDK_RELEASE="X.Y.Z-beta"
export DAPR_JAVA_SDK_RC_COUNT="1" #Incremented count like 1, 2, 3, etc..

export DAPR_JAVA_SDK_RELEASE_BRANCH="release-${DAPR_JAVA_SDK_RELEASE}"
export DAPR_JAVA_SDK_VERSION="${DAPR_JAVA_SDK_RELEASE}-${DAPR_JAVA_SDK_RC_COUNT}"

git checkout -b $DAPR_JAVA_SDK_RELEASE_BRANCH
./scripts/update_sdk_version.sh $DAPR_JAVA_SDK_VERSION

git commit -m "Release $DAPR_JAVA_SDK_VERSION" -a
git push origin $DAPR_JAVA_SDK_RELEASE_BRANCH
git tag v$DAPR_JAVA_SDK_VERSION
git push origin --tags
  1. Create release-X.Y branch and push
# Set the three environment variables below.
export DAPR_JAVA_SDK_RELEASE="X.Y"
export DAPR_JAVA_SDK_PATCH_VERSION="0" #Incremented count like 0, 1, 2, 3, etc..
export DAPR_JAVA_SDK_RC_COUNT="1" #Incremented count like 1, 2, 3, etc..

export DAPR_JAVA_SDK_RELEASE_BRANCH="release-${DAPR_JAVA_SDK_RELEASE}"
export DAPR_JAVA_SDK_VERSION="${DAPR_JAVA_SDK_RELEASE}.${DAPR_JAVA_SDK_PATCH_VERSION}-rc-${DAPR_JAVA_SDK_RC_COUNT}"

git checkout -b $DAPR_JAVA_SDK_RELEASE_BRANCH
./scripts/update_sdk_version.sh $DAPR_JAVA_SDK_VERSION
git commit -m "Release $DAPR_JAVA_SDK_VERSION" -a
git push origin $DAPR_JAVA_SDK_RELEASE_BRANCH

  1. Tag RC version (vX.Y.Z-rc-W)
git tag v$DAPR_JAVA_SDK_VERSION
git push origin --tags
  1. Prepare next release: Update version in master branch
# Set the two environment variables below.
export DAPR_JAVA_SDK_NEXT_RELEASE="X.Y"
export DAPR_JAVA_SDK_NEXT_PATCH_VERSION="0" #Incremented count like 0, 1, 2, 3, etc..

export DAPR_JAVA_SDK_NEXT_VERSION="${DAPR_JAVA_SDK_NEXT_RELEASE}.${DAPR_JAVA_SDK_NEXT_PATCH_VERSION}-SNAPSHOT"

git checkout master
git pull
git checkout -b next-release-${DAPR_JAVA_SDK_NEXT_VERSION}
./scripts/update_sdk_version.sh $DAPR_JAVA_SDK_NEXT_VERSION

git commit -m "Upgrade the version to ${DAPR_JAVA_SDK_NEXT_VERSION}" -a
git push origin next-release-${DAPR_JAVA_SDK_NEXT_VERSION}
  1. Prepare next release: Create PR from next-release-* branch to master branch

  2. GitHub Actions will build and publish RC pkgs to Nexus OSS repository

  3. Test RC builds.

  4. In case of bugs, generate new RCs.

  5. Once the RC is good, remove "rc" suffix.

export DAPR_JAVA_SDK_VERSION="${DAPR_JAVA_SDK_RELEASE}.${DAPR_JAVA_SDK_PATCH_VERSION}"

git checkout $DAPR_JAVA_SDK_RELEASE_BRANCH ./scripts/update_sdk_version.sh $DAPR_JAVA_SDK_VERSION

9. Push the change to `release-X.Y`

git commit -m "Upgrade version to $DAPR_JAVA_SDK_VERSION" -a git push origin $DAPR_JAVA_SDK_RELEASE_BRANCH

10. Update README.md and Javadocs website

Edit README.md documentation to point to new version X.Y.Z

git rm -rf docs mvn clean install mvn site-deploy git add docs git commit -m "Generate updated javadocs" git push origin release-X.Y git checkout master git pull git checkout -b update_javadocs git cherry-pick release-X.Y git push origin update_javadocs

Create PR into master and merge it.

11. Create version tag and push it

git checkout $DAPR_JAVA_SDK_RELEASE_BRANCH git tag v${DAPR_JAVA_SDK_VERSION} git push origin --tags

12. CI will release final build to central repository

## Version naming:
Naming convention is inspired by the one used in [JUnit](https://mvnrepository.com/artifact/junit/junit)

* Preview prior to a release candidate (optional): X.Y.Z-beta-W
* Release candidate: X.Y.Z-rc-W
* Release: X.Y.Z
* Release branch: release-X.Y
* Next release: X.Y.Z-SNAPSHOT
* RC and beta counts start with 1.
Clone this wiki locally