Skip to content

Commit

Permalink
update homebrew formula update logic (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 authored May 9, 2024
1 parent 7b1c743 commit e2a88d6
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [ created ]

jobs:
build-n-publish:
build-n-publish-pypi:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -35,23 +35,31 @@ jobs:
- name: Publish distribution to PyPI
uses: pypa/[email protected]

- name: Bump Homebrew formula
uses: mislav/bump-homebrew-formula-action@v3
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
with:
formula-name: comfy-cli
formula-path: Formula/comfy-cli.rb
homebrew-tap: Comfy-Org/homebrew-comfy-cli
base-branch: main # Adjust if your default branch is different
commit-message: |
Update comfy-cli to ${{ env.VERSION }}
publish-homebrew-tap:
runs-on: ubuntu-latest
needs: build-n-publish-pypi
steps:
- name: Checkout code
uses: actions/checkout@v2

Created by actions/bump-homebrew-formula-action
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Set up Python environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install comfy-cli==$VERSION homebrew-pypi-poet
- name: Generate Homebrew Formula
run: |
source venv/bin/activate
poet comfy-cli==$VERSION > comfy-cli.rb
test-homebrew-installation:
name: Test Comfy CLI Installation via homebrew
needs: build-n-publish # This job runs after build-n-publish completes successfully
needs: publish-homebrew-tap # This job runs after build-n-publish completes successfully
runs-on: macos-latest
steps:
- name: Tap comfy-cli homebrew tap repository
Expand Down

0 comments on commit e2a88d6

Please sign in to comment.