Update Formula #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Formula | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
update_formula: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dart-lang/setup-dart@v1 | |
- name: Dart SDK | |
run: dart --version | |
- uses: actions/checkout@v5 | |
- name: Update Formula | |
run: | | |
git clone --single-branch "https://${{ secrets.HOMEBREW_PAT }}@github.com/birjuvachhani/homebrew-spider.git" "clone_dir" | |
GIT_TAG=`git describe --tags --abbrev=0` | |
SPIDER_URL="https://github.com/BirjuVachhani/spider/archive/refs/tags/$GIT_TAG.tar.gz" | |
curl -L -o spider.tar.gz "$SPIDER_URL" | |
export SPIDER_SHA=`sha256sum spider.tar.gz | cut -d' ' -f1` | |
echo "SHA: $SPIDER_SHA" | |
echo "VERSION: $GIT_TAG" | |
dart update_formula.dart "$GIT_TAG" "$SPIDER_SHA" "clone_dir/Formula/spider.rb" | |
cd clone_dir | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add Formula/spider.rb | |
git commit -m 'update formula' | |
git pull --rebase | |
git push | |