Skip to content

Commit e2a88d6

Browse files
authored
update homebrew formula update logic (#39)
1 parent 7b1c743 commit e2a88d6

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/publish_package.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [ created ]
66

77
jobs:
8-
build-n-publish:
8+
build-n-publish-pypi:
99
name: Build and publish Python distributions to PyPI
1010
runs-on: ubuntu-latest
1111
permissions:
@@ -35,23 +35,31 @@ jobs:
3535
- name: Publish distribution to PyPI
3636
uses: pypa/gh-action-pypi-publish@v1.8.14
3737

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

50-
Created by actions/bump-homebrew-formula-action
45+
- name: Extract version from tag
46+
id: get_version
47+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
48+
49+
- name: Set up Python environment
50+
run: |
51+
python3 -m venv venv
52+
source venv/bin/activate
53+
pip install comfy-cli==$VERSION homebrew-pypi-poet
54+
55+
- name: Generate Homebrew Formula
56+
run: |
57+
source venv/bin/activate
58+
poet comfy-cli==$VERSION > comfy-cli.rb
5159
5260
test-homebrew-installation:
5361
name: Test Comfy CLI Installation via homebrew
54-
needs: build-n-publish # This job runs after build-n-publish completes successfully
62+
needs: publish-homebrew-tap # This job runs after build-n-publish completes successfully
5563
runs-on: macos-latest
5664
steps:
5765
- name: Tap comfy-cli homebrew tap repository

0 commit comments

Comments
 (0)