-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update homebrew formula update logic (#39)
- Loading branch information
1 parent
7b1c743
commit e2a88d6
Showing
1 changed file
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|