Skip to content

v1.2.6

v1.2.6 #28

Workflow file for this run

name: Update Homebrew Formula
on:
release:
types: [published]
jobs:
update-homebrew:
runs-on: ubuntu-latest
steps:
- name: Checkout main repo
uses: actions/checkout@v4
with:
repository: Matars/gitfetch
path: gitfetch
- name: Get version from pyproject.toml
id: get_version
run: |
VERSION=$(grep '^version =' gitfetch/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Checkout tap repo
uses: actions/checkout@v4
with:
repository: Matars/homebrew-gitfetch
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: homebrew-tap
- name: Update formula
run: |
cd homebrew-tap
chmod +x .github/scripts/update-homebrew.sh
VERSION=${{ steps.get_version.outputs.version }} ./.github/scripts/update-homebrew.sh
- name: Commit and push
run: |
cd homebrew-tap
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add Formula/gitfetch.rb
git commit -m "Update gitfetch to v${{ steps.get_version.outputs.version }}"
git push