|
1 | 1 | # Releasing |
2 | 2 |
|
3 | 3 | 1. Create a release branch using the naming scheme `release-x.x.x` |
| 4 | + |
| 5 | + ```shell |
| 6 | + git checkout main |
| 7 | + git pull |
| 8 | + git checkout -b release-x.x.x |
| 9 | + ``` |
| 10 | + |
4 | 11 | 2. Bump the `VERSION` inside `lib/factory_bot/version.rb` |
| 12 | + |
5 | 13 | 3. Run `bundle install` to ensure the `Gemfile.lock` file is up to date. |
6 | | -4. Update `NEWS.md` to reflect the changes since last release. |
7 | | - A useful GitHub URL to compare the changes is: |
8 | | - `https://github.com/thoughtbot/factory_bot/compare/vLAST_VERSION...main` |
9 | | -5. Commit the changes. |
| 14 | + |
| 15 | +4. Generate release notes using [GitHub's New Release](https://github.com/thoughtbot/factory_bot/releases/new) feature. |
| 16 | + |
| 17 | + 1. Click the tags drop down and select "Create new tag" |
| 18 | + 2. Fill in the create new tag modal and select "Create" |
| 19 | + Note: This is a safe step as the tag will not be created unless the release is published |
| 20 | + 3. Click the "Generate release notes" button |
| 21 | + 4. Copy the generated text from the "What's Changed" section, for use when updating `NEWS.md` in the next step. |
| 22 | + |
| 23 | +5. Update `NEWS.md` to reflect the changes since last release. |
| 24 | + |
| 25 | + 1. Add a heading with the version number and date |
| 26 | + 2. Paste the release notes you copied from the previous step |
| 27 | + Note: A useful GitHub URL to compare the changes is: |
| 28 | + `https://github.com/thoughtbot/factory_bot/compare/vLAST_VERSION...main` |
| 29 | + |
| 30 | +6. Commit the changes. |
10 | 31 | Note: As there shouldn't be code changes, CI doesn't need to run. |
11 | 32 | You can add `[ci skip]` to the commit message to skip it. |
12 | | -6. Create a Pull Request, get it reviewed, and merge it to the `main` branch once approved. |
13 | | -7. Back on your machine, switch to the `main` branch and tag the latest commit with the release version: `git tag -s vVERSION` |
| 33 | + |
| 34 | +7. Create a Pull Request, get it reviewed, and merge it to the `main` branch once approved. |
| 35 | + |
| 36 | +8. Back on your machine, switch to the `main` branch and tag the latest commit with the release version: `git tag -s vVERSION` |
| 37 | + |
14 | 38 | - We recommend the [_quick guide on how to sign a release_] from git ready. |
15 | | -8. Push your changes: `git push && git push --tags` |
16 | | -9. If you haven't already, add yourself as an owner of the `factory_bot` gem on [rubygems.org](https://rubygems.org/) using [the guide in the thoughtbot handbook](https://github.com/thoughtbot/handbook/blob/main/operations/services/rubygems.md#managing-rubygems) |
17 | | -10. Build and publish the gem: |
| 39 | + |
| 40 | +9. Push your changes: `git push && git push --tags` |
| 41 | + |
| 42 | +10. If you haven't already, add yourself as an owner of the `factory_bot` gem on [rubygems.org](https://rubygems.org/) using [the guide in the thoughtbot handbook](https://github.com/thoughtbot/handbook/blob/main/operations/services/rubygems.md#managing-rubygems) |
| 43 | + |
| 44 | +11. Build and publish the gem: |
18 | 45 |
|
19 | 46 | ```bash |
20 | 47 | gem build factory_bot.gemspec |
21 | 48 | gem push factory_bot-VERSION.gem |
22 | 49 | ``` |
23 | 50 |
|
24 | | -11. On GitHub, add a new release using the recent `NEWS.md` as the content. Sample |
| 51 | +12. On GitHub, add a new release using the recent `NEWS.md` as the content. Sample |
25 | 52 | URL: `https://github.com/thoughtbot/factory_bot/releases/new?tag=vVERSION` |
26 | | -12. Announce the new release, making sure to say "thank you" to the contributors who helped shape this version! |
| 53 | + |
| 54 | +13. Announce the new release, making sure to say "thank you" to the contributors who helped shape this version! |
27 | 55 | thoughtbotters can refer to the handbook for announcements guidelines. |
28 | 56 |
|
29 | 57 | [_quick guide on how to sign a release_]: http://gitready.com/advanced/2014/11/02/gpg-sign-releases.html |
0 commit comments