From abe6d8dd306b947eaa7421b3fa154a85cdc2ded4 Mon Sep 17 00:00:00 2001 From: Azeem Sajid Date: Fri, 31 Jan 2025 13:18:46 +0500 Subject: [PATCH 1/2] [docs/releasing.md] Add basic info for homebrew update flow --- docs/releasing.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/releasing.md b/docs/releasing.md index 4b977efdd..f1b87a9a7 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1,15 +1,20 @@ # Releasing To initiate a new production deployment: + ```sh script/release vX.Y.Z ``` + See `script/release --help` for more information. -> **Note:** -> Every production release will request an approval by the select few people before it can proceed. +> [!NOTE] +> +> Every production release will request an approval by the select few people +> before it can proceed. What this does is: + - Builds Linux binaries on Ubuntu; - Builds and signs Windows binaries on Windows; - Builds, signs, and notarizes macOS binaries on macOS; @@ -18,22 +23,31 @@ What this does is: - The changelog is [generated from the list of merged pull requests](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes); - Updates cli.github.com with the contents of the new release; - Updates the [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb) in the [`homebrew/homebrew-core` repo](https://github.com/search?q=repo%3AHomebrew%2Fhomebrew-core+%22gh%22+in%3Atitle&type=pullrequests). + - The [GitHub CLI deployment workflow](.github/workflows/deployment.yml) + initiates a PR to update the `gh` Homebrew formula. + - This updated formula is then picked up by the scheduled workflow for its + inclusion in the `homebrew/homebrew-core`. To test out the build system while avoiding creating an actual release: + ```sh script/release --staging vX.Y.Z --branch patch-1 -p macos ``` + The build artifacts will be available via `gh run download -n macos`. ## General guidelines -* Features to be released should be reviewed and approved at least one day prior to the release. -* Feature releases should bump up the minor version number. -* Breaking releases should bump up the major version number. These should generally be rare. +- Features to be released should be reviewed and approved at least one day prior + to the release. +- Feature releases should bump up the minor version number. +- Breaking releases should bump up the major version number. These should + generally be rare. ## Test the build system locally -A local release can be created for testing without creating anything official on the release page. +A local release can be created for testing without creating anything official on +the release page. 1. Make sure GoReleaser is installed: `brew install goreleaser` 2. `script/release --local` @@ -45,5 +59,6 @@ Occasionally, it might be necessary to clean up a bad release and re-release. 1. Delete the release and associated tag 2. Re-release and monitor the workflow run logs -3. Open pull request updating [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb) with new SHA versions, linking the previous PR +3. Open pull request updating [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb) + with new SHA versions, linking the previous PR 4. Verify resulting Debian and RPM packages, Homebrew formula From 4cf0901b87eb6ad189d6d4eb9d4947295cf57feb Mon Sep 17 00:00:00 2001 From: Andy Feller Date: Thu, 6 Feb 2025 18:12:42 -0500 Subject: [PATCH 2/2] Update release doc content - simplifying certain language - updating content around scheduled formula workflow process that makes new versions available --- docs/releasing.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/releasing.md b/docs/releasing.md index f1b87a9a7..5e3e48a98 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -9,9 +9,7 @@ script/release vX.Y.Z See `script/release --help` for more information. > [!NOTE] -> -> Every production release will request an approval by the select few people -> before it can proceed. +> Deployment workflow requires maintainer approval to run. What this does is: @@ -21,12 +19,13 @@ What this does is: - Uploads all release artifacts to a new GitHub Release; - A new git tag `vX.Y.Z` is created in the remote repository; - The changelog is [generated from the list of merged pull requests](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes); -- Updates cli.github.com with the contents of the new release; +- Updates [GitHub CLI marketing site](https://cli.github.com) with the contents of the new release; - Updates the [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb) in the [`homebrew/homebrew-core` repo](https://github.com/search?q=repo%3AHomebrew%2Fhomebrew-core+%22gh%22+in%3Atitle&type=pullrequests). - - The [GitHub CLI deployment workflow](.github/workflows/deployment.yml) - initiates a PR to update the `gh` Homebrew formula. - - This updated formula is then picked up by the scheduled workflow for its - inclusion in the `homebrew/homebrew-core`. + +> [!NOTE] +> `Homebrew/formulae.brew.sh` makes new formula versions available every 15 minutes through scheduled [CI workflow](https://github.com/Homebrew/formulae.brew.sh/actions/workflows/tests.yml). +> +> For more information, see https://docs.brew.sh/Formula-Cookbook#an-introduction To test out the build system while avoiding creating an actual release: