To release a new version of the CLI, you must:
-
Do a quick test of the CLI in your local development. At this stage, you are only verifying there is no complete failure of the CLI.
-
To preview which commits will be included in a release, run this command:
git log --oneline --invert-grep --grep="Merge branch" --invert-grep --grep="chore" $(git describe --tags --abbrev=0)..main | sort -k2
If those changes are appropriate to be released, proceed with the process:
- Tag the latest commit on
main(such asgit tag v1.74.1). - Push with these commands:
git push origin mainandgit push origin v1.74.1
If the release is time-sensitive, such as for a security release, consider emailing the maintainers of the community-maintained channels. Contacts for the different maintainers are available in CLI 1Password Vault in the Maintainers of Community packages note.
Homebrew releases were automated by the CI build. These manual instructions are provided if the automation fails.
Prerequisites:
- An account on GitHub. (Any account is fine.)
To manually update the version available through Homebrew:
-
Generate a new token with the
repo,workflow, andgistscopes using this link. If you have an existing token with the correct scope, you can use it instead. -
On the Releases page for this project, identify the release version you want to publish.
-
In the Assets area for the release, download the packaged source code (
Source code (tar.gz)) for this release. -
To compute the SHA256 checksum, run
sha256sum cli-v1.74.1.tar.gz. -
Create a pull request with the update with this command, modifying the source code URL and SHA as needed:
brew bump-formula-pr --strict glab \ --url="https://gitlab.com/gitlab-org/cli/-/archive/v1.74.1/cli-v1.74.1.tar.gz" \ --sha256=b1b8ed3f4c7d8839b540d8a264b3a3ef670e78ae369ef0c01ef5d5e502714905 -
When the pull request is merged, the update is complete.
Snapcraft releases are automated:
- The
latest/edgechannel is automatically built on every commit tomain. - The
latest/stablechannel is automatically built when a new tag is pushed.
No manual action is required for Snapcraft releases.
No manual action required.
The glab project was moved to GitLab in pull request 4168.
Scoop uses the autoupdate URL for updating to newer versions.
Prerequisites:
- You must have a GitHub account.
- You must have signed Microsoft's Contributor License Agreement (CLA).
- You have read the GitLab policy for Contributing to a third-party project on behalf of GitLab. (The confidential, internal legal issue is also available.)
To update the WinGet package:
-
On the Releases page for this project, identify the release version you want to publish.
-
In the Assets area for the release, identify the Windows installer package (the filename should end in
_installer.exe) and download it. -
Compute the SHA256 checksum for the file by running
sha256sum filename.exe, replacingfilenamewith the name of release installer you downloaded in the previous step. For example:$ sha256sum glab_1.23.1_Windows_x86_64_installer.exe 36f9d45f68ea53cbafdbe96ba4206e4412abb4c2b8f00ba667054523bd7cc89e glab_1.23.1_Windows_x86_64_installer.exe
-
Copy the SHA from the result.
-
On GitHub, create a pull request in the
microsoft/winget-pkgsproject. Use the pull request to update to version 1.23.1 as an example.
For automated testing, you need to set up credentials for unit testing.
For releasing, you also need to add a GITLAB_TOKEN_RELEASE. To create this token:
- Go to Settings -> Access Tokens
- Generate a new project token with
apiscope andMaintainerrole. - Add the new token as
GITLAB_TOKEN_RELEASEprotected and masked CI/CD variables.