Skip to content

Commit

Permalink
add update-homebrew-formula job to release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Faeka Ansari <[email protected]>
  • Loading branch information
fykaa committed Nov 28, 2024
1 parent 9025a5f commit f126736
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 23 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,42 @@ jobs:
base64-subjects: "${{ needs.combine_hashes.outputs.hashes }}"
upload-assets: true # Optional: Upload to a new release
provenance-name: kargo-cli.intoto.jsonl
update-homebrew-formula:
if: github.event_name == 'release'
permissions:
contents: write # Needed to push changes
pull-requests: write # Needed to create a pull request
runs-on: ubuntu-latest
needs: [ publish-image, publish-cli ]
steps:
- name: Checkout bottle Repository
uses: actions/checkout@v4
with:
repository: akuity/homebrew-tap
token: ${{ secrets.GITHUB_TOKEN }}
path: homebrew-tap

- name: Update Homebrew formula
run: |
cd homebrew-tap
./update.sh kargo ${{ github.ref_name }}
- name: Configure Git and Commit changes
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
cd homebrew-tap
git checkout -b update-kargo-${{ github.ref_name }}
git add kargo.rb
git commit -m "chore: update Kargo cli to version ${{ github.ref_name }}"
- name: Push changes and open PR
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Kargo formula to version ${{ github.ref_name }}"
branch: update-kargo-${{ github.ref_name }}
base: main
title: "chore: update Kargo formula to version ${{ github.ref_name }}"
body: "This PR updates the Homebrew formula for Kargo to version ${{ github.ref_name }}."
delete-branch: 'true'
23 changes: 0 additions & 23 deletions docs/docs/40-contributor-guide/15-release-procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,6 @@ release date -- which is always a Friday.
[automated release process](https://github.com/akuity/kargo/actions/workflows/release.yaml)
to complete.

1. Update [Homebrew Formula](https://github.com/akuity/homebrew-tap).

* Clone the Homebrew tap repository:
```bash
git clone https://github.com/akuity/homebrew-tap.git
cd homebrew-tap
```
* Run the update script with the new version:
```bash
./update.sh kargo vM.m.0
```
* Verify the updated formula:
```bash
brew install --build-from-source ./kargo.rb
kargo --version
```
* Commit and push the changes to the Homebrew tap repository:
```bash
git add kargo.rb
git commit -m "Update Kargo formula to version vM.m.0"
git push origin main
```

1. Mark the release branch (`release-M.m`) as the __"Production branch"__
[in Netlify](https://app.netlify.com/sites/docs-kargo-akuity-io/configuration/deploys#branches-and-deploy-contexts).

Expand Down

0 comments on commit f126736

Please sign in to comment.