|
| 1 | +# Releasing |
| 2 | + |
| 3 | +**Note**: This guide does not yet cover the full process for releasing a major version, which is |
| 4 | +more complex. |
| 5 | + |
| 6 | +## 0 - Decide when to release |
| 7 | + |
| 8 | +All releases should have a milestone. A release is ready to go when all issues/PRs in the milestone |
| 9 | +are either closed or have the `fix-implemented` lablel. |
| 10 | + |
| 11 | +FirebaseUI does not have strict guidance on release frequency. Minor and patch releases can go out |
| 12 | +as soon as they are ready. Major releases with breaking changes should happen as infrequently as |
| 13 | +possibly, preferable not more than 1-2 a year unless required by the underlying SDKs. |
| 14 | + |
| 15 | +## 1 - Create the release branch |
| 16 | + |
| 17 | +First, check out the latest `version-x.y.z-dev` branch. Branch from the `HEAD` of that branch |
| 18 | +to create a new `version-x.y.z` branch: |
| 19 | + |
| 20 | +```shell |
| 21 | +$ VERSION=1.2.3 |
| 22 | +$ git checkout version-$VERSION-dev && git pull origin version-$VERSION-dev |
| 23 | +$ git checkout -b version-$VERSIOn |
| 24 | +``` |
| 25 | + |
| 26 | +Next, make the following changes on the release branch: |
| 27 | + |
| 28 | + * Update `Config.kt` to remove the `SNAPSHOT` from the version name. |
| 29 | + * Update `README.md` and `auth/README.md` to point to the latest version of the library |
| 30 | + and to have the correct descriptions of transitive dependencies. |
| 31 | + |
| 32 | +Commit the changes with a generic message: |
| 33 | + |
| 34 | +```shell |
| 35 | +$ git commit -am "Version x.y.z" |
| 36 | +``` |
| 37 | + |
| 38 | +Next, upload the release branch to GitHub and create a pull request against `master`: |
| 39 | + |
| 40 | +```shell |
| 41 | +$ git push -u origin HEAD:version-$VERSION |
| 42 | +``` |
| 43 | + |
| 44 | +When ready, merge the pull request. |
| 45 | + |
| 46 | +## 2 - Upload to Bintray |
| 47 | + |
| 48 | +Once you are sure the release branch is healthy, run the following command: |
| 49 | + |
| 50 | +```shell |
| 51 | +$ ./gradlew clean :library:prepareArtifacts :library:bintrayUploadAll |
| 52 | +``` |
| 53 | + |
| 54 | +This will upload the release to Bintray as a draft. You will need to go to this page and click |
| 55 | +**Publish** to release the draft artifacts. When done correctly you should see 8 pending draft |
| 56 | +artifacts per library: |
| 57 | + |
| 58 | +https://bintray.com/firebaseui/firebase-ui |
| 59 | + |
| 60 | +## 3 - Update issues, milestones, and release notes |
| 61 | + |
| 62 | +First, go to the milestone for the released version and for each open issue: |
| 63 | + |
| 64 | + * Close the issue. |
| 65 | + * Comment to let anyone watching know that the fix/feature has been released. |
| 66 | + |
| 67 | +Next, create a git tag for the latest version. In GitHub, create release notes based on the |
| 68 | +template from the previous version and assign the release ntoes to the tag. |
| 69 | + |
| 70 | +## 4 - Prepare next development branch |
| 71 | + |
| 72 | +Check out a new `version-x.y.z-dev` branch from `master`. Change the version to be the next |
| 73 | +`SNAPSHOT` version and then push the new dev branch up. |
| 74 | + |
| 75 | +When possible, change all outstanding PRs to target the new dev branch and then delete the old |
| 76 | +`dev` branch. |
0 commit comments