Skip to content

Update Homebrew Formula #196

Update Homebrew Formula

Update Homebrew Formula #196

name: Update Homebrew Formula
on:
schedule:
- cron: '0 */12 * * *' # Every 12 hours
workflow_dispatch: # Allow manual trigger
jobs:
update-formula:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download latest eigenwallet.rb from releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
# Get the latest non-preview release tag
LATEST_RELEASE=$(gh release list --repo eigenwallet/core --json tagName,isPrerelease --jq '[.[] | select(.isPrerelease == false) | .tagName][0]')
if [[ -z "$LATEST_RELEASE" ]]; then
echo "No stable release found"
exit 1
fi
echo "Latest release: $LATEST_RELEASE"
echo "LATEST_RELEASE=$LATEST_RELEASE" >> $GITHUB_ENV
# Download the formula file
gh release download "$LATEST_RELEASE" \
--repo eigenwallet/core \
--pattern "eigenwallet.rb" \
--dir /tmp
# Move it to the Casks directory
mkdir -p Casks
mv /tmp/eigenwallet.rb Casks/eigenwallet.rb
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Casks/eigenwallet.rb
git commit -m "Update eigenwallet cask to ${{ env.LATEST_RELEASE }}"
git push