Skip to content

Releasing

jemmaSlater edited this page Oct 21, 2024 · 6 revisions

Releasing

There are three different modules we can release from this repo:

  • Components - The HMRC Component library built with xml
  • Components test - Some test matchers and helpers for the xml Component library
  • Compose Components - The HMRC Component library built with Jetpack Compose

Setup - GitHub CLI

As part of the release process, GitHub's CLI tool is used. To have the entire process work smoothly you should have it set up on your machine.

Please follow the installation instructions to get it set up.

GitHub's CLI tool is used to automatically create a pull request as part of the release process.

If you do not have GitHub's CLI set up on your machine, you will need to create the PR manually

Compose Components library

To release you need to:

  • Have a valid Bitrise access token saved in your path under the variable name BITRISE_TOKEN. See Bitrise docs.
  • Set the environment variable ANDROID_COMPONENTS_COMPOSE_RELEASE_WORKFLOW_ID in your bash/ZSH profile. This can be found in Bitwarden.

To release the library, run bundle exec fastlane release_components_compose_version and choose to bump either the major, minor or patch when prompted.

This will create a new tag, update the changelog and trigger the publish_compose workflow on Bitrise.

Then you need to:

  • Check Bitrise to verify that the publish_compose workflow was triggered
  • Check GitHub to see the PR and request reviews from the relevant people. Once approved, merge to bring the main branch up to date with the latest release.

Note: the PR does not need to merged for the release to happen

Components library (xml)

To release you need to:

  • Have a valid Bitrise access token saved in your path under the variable name BITRISE_TOKEN. See Bitrise docs.
  • Set two environment variables: ANDROID_COMPONENTS_APP_SLUG & ANDROID_COMPONENTS_RELEASE_WORKFLOW_ID, in your bash/ZSH profile. These can be found in Bitwarden.

To release the library, run bundle exec fastlane tag_release and choose to bump either the major, minor or patch when prompted.

This will create a new tag, update the changelog and trigger the publish workflow on Bitrise.

Then you need to:

  • Check Bitrise to verify that the publish workflow was triggered
  • Check GitHub to see the PR and request reviews from the relevant people. Once approved, merge to bring the main branch up to date with the latest release.

Note: the PR does not need to merged for the release to happen

Components Test library

  1. Increment the version number in components-test/build.gradle, then commit & push these changes.
  2. Run bundle exec fastlane release_test_version