|
5 | 5 | types: [ created ] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build-n-publish: |
| 8 | + build-n-publish-pypi: |
9 | 9 | name: Build and publish Python distributions to PyPI |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | permissions: |
@@ -35,23 +35,31 @@ jobs: |
35 | 35 | - name: Publish distribution to PyPI |
36 | 36 | uses: pypa/gh-action-pypi-publish@v1.8.14 |
37 | 37 |
|
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 |
49 | 44 |
|
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 |
51 | 59 |
|
52 | 60 | test-homebrew-installation: |
53 | 61 | 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 |
55 | 63 | runs-on: macos-latest |
56 | 64 | steps: |
57 | 65 | - name: Tap comfy-cli homebrew tap repository |
|
0 commit comments