-
Notifications
You must be signed in to change notification settings - Fork 0
Release Process
This document describes how to create a new release of Xamrock CLI and update the Homebrew formula.
The project uses GitHub Actions to automatically update the Homebrew formula when a new release is published.
-
Ensure all changes are committed:
git add . git commit -m "Prepare for release 0.2.0" git push origin main
-
Create and push the tag (without 'v' prefix):
git tag 0.2.0 git push origin 0.2.0
-
Create the GitHub release:
- Go to https://github.com/Xamrock/CLI/releases/new
- Select the tag you just pushed (0.2.0)
- Set release title (e.g., "Release 0.2.0")
- Add release notes describing changes
- Click "Publish release"
-
Automatic Homebrew update:
- The GitHub Action will automatically:
- Download the release tarball
- Calculate the SHA256 hash
- Update the Homebrew formula in
xamrock/homebrew-tap - Push changes to the tap repository
- Check the Actions tab to see the workflow progress
- Users can then run
brew upgrade xamrockto get the new version
- The GitHub Action will automatically:
For the automation to work, you need to configure a GitHub token:
-
Create a Personal Access Token:
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Name: "Homebrew Tap Updater"
- Scopes: Select
repo(full control of private repositories) - Click "Generate token"
- Copy the token immediately (you won't see it again)
-
Add token to CLI repository secrets:
- Go to https://github.com/xamrock/CLI/settings/secrets/actions
- Click "New repository secret"
- Name:
HOMEBREW_TAP_TOKEN - Value: Paste the token you copied
- Click "Add secret"
That's it! Future releases will automatically update the Homebrew formula.
If you need to update the formula manually or the automation fails:
git tag 0.2.0
git push origin 0.2.0Create the release via the web interface at https://github.com/Xamrock/CLI/releases/new
VERSION=0.2.0
curl -L -o xamrock.tar.gz "https://github.com/Xamrock/CLI/archive/refs/tags/$VERSION.tar.gz"
shasum -a 256 xamrock.tar.gzcd ../homebrew-tap
# Edit Formula/xamrock.rb
# Update the url line with new version (without 'v' prefix)
# Update the sha256 line with calculated hash
git add Formula/xamrock.rb
git commit -m "Update xamrock formula to version $VERSION"
git pushbrew update
brew upgrade xamrock
xamrock --help- Use semantic versioning:
MAJOR.MINOR.PATCH -
Do NOT use 'v' prefix in tags (use
0.2.0, notv0.2.0) - The workflow will handle both formats if accidentally used
- All changes committed and pushed
- Create and push git tag (e.g.,
0.2.0without 'v' prefix) - Create GitHub release
- Verify GitHub Action completed successfully
- Test installation with
brew upgrade xamrock
- All changes committed and pushed
- Create and push git tag (e.g.,
0.2.0) - Create GitHub release
- Download release tarball
- Calculate SHA256 hash
- Update
homebrew-tap/Formula/xamrock.rbwith new version and SHA256 - Commit and push formula changes
- Test installation with
brew upgrade xamrock
- Check that the
HOMEBREW_TAP_TOKENsecret is set correctly in the CLI repository - Verify the token has
reposcope permissions - Make sure the token hasn't expired
- The workflow automatically calculates the correct hash
- If manual intervention is needed, download the exact tarball GitHub generates
- Use:
shasum -a 256 <tarball>(notsha256sumon macOS)
- Ensure the release is published (not just a draft)
- Check the Actions tab for any errors
- Verify the workflow file is in
.github/workflows/update-homebrew.yml
Test your formula locally before pushing:
brew install --build-from-source Formula/xamrock.rbIf the Homebrew build fails, check:
- Swift toolchain version requirements
- Dependencies are correctly specified
- Build commands work in a clean directory
If users report installation issues:
-
Test the formula yourself:
brew uninstall xamrock brew install --verbose --debug xamrock
-
Check the build logs for errors
-
Update the formula if needed
-
Notify users to
brew update && brew upgrade xamrock