This defines the One App release process.
Releases can be triggered in two ways:
-
An automated pull request will be raised every Wednesday at 16:00 UTC, from a
prepare-release
branch to main. This uses pull_request_release workflow and updates the package.json, package-lock.json, one-app-statics package.json and runsnpm run release:changelog
to generate the changelog. Behind the scene it uses standard-version to update these file versions and conventional-changelog to generate the changelog. The commit message will be in the following formatchore(release): X.X.X
. You can update this pull request to remove or add any new changes. -
Once a pull request is reviewed, merge the pull request and please ensure that the commit message is updated to follow this pattern
#chore(release): 5.0.0 chore(release): <semantic-version>
Integration tests will continue to run in Travis as they currently do, after the automated pull request is created it would run the tests on
prepare-release
branch. -
The merge will trigger the automatic generation of a new tag using the semantic version provided during the merging of the pull request above.
-
After the the generated tag is pushed to the branch this will trigger the docker build and publish the statics and push the images to Docker Hub. The development and production images would be accessible in docker https://hub.docker.com/u/oneamex
-
The statics assets will be published and added to the tag created via the release static assets action as part of the previous step.
-
We are currently using https://github.com/release-drafter/release-drafter to generate release notes. This is a github action that generates draft releases note that can be added to the released tag. Please add the labels specified within release-drafter to categorize different pull requests to ensure that any changes are categorized correctly. You can also use the changelog generated for this content.
-
Update the draft release notes with any changes required and edit the released tag to add them there.
-
For the release notes use the below format. Please review some of the releases to check the format used https://github.com/americanexpress/one-app/releases
[Paste changelog entries here]
### Docker Images
#### Developer Image
[one-app-dev/version-released](https://hub.docker.com/layers/oneamex/one-app-dev/link-to-the-docker-tag)
#### Production Image
one-app/version-released](https://hub.docker.com/layers/oneamex/one-app/link-to-the-docker-tag)
### One App Statics
https://www.npmjs.com/package/@americanexpress/one-app-statics
This process can be used to make ad hoc releases outside of wednesday release cycle.
- Run
npm run release
locally within your branch, this would update package.json, package-lock.jsonand one-app-statics package.json with the new version to be released. - Run
npm run release:changelog
to generate and update the changelog. - Commit using the
chore(release): X.X.X
message format and push your changes to the branchprepare-release
, then create a pull request to main. - When the changes are merged and reviewed. The same process from step 3 above will be followed.
If changes were made and need to be reverted. Please use the manual release process to revert the changes and raise a patch release.
For the first release please use the manual release process. Run npm run release -- --first-release
to update the package.json files.
For the first release please use the manual release process. Run npm run release -- --prerelease
to update the package.json files.
We should try to prevent this from happening, but if it does happen, trigger the pull request to update by typing /prepare-release
once that has completed a 🚀 and 👀 reaction would be added to the comment.
Locally you can run npm run release -- --dry-run
, this would show the new version to be released and the files that would changed.