-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11d5cdc
commit 39a0ec2
Showing
1 changed file
with
36 additions
and
17 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 |
---|---|---|
|
@@ -81,36 +81,43 @@ jobs: | |
repository: 'Comfy-Org/homebrew-comfy-cli' | ||
token: ${{ secrets.COMMITTER_TOKEN }} | ||
path: 'homebrew-repo' | ||
|
||
- 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 -f comfy-cli==$VERSION > comfy-cli.rb | ||
poet -f comfy-cli==$VERSION > comfy-cli@${{ env.VERSION }}.rb | ||
- name: Copy Version Formula as Latest | ||
run: cp comfy-cli@${{ env.VERSION }}.rb comfy-cli.rb | ||
|
||
- name: Move Formulas to Tap Directory | ||
run: | | ||
mv comfy-cli@${{ env.VERSION }}.rb homebrew-repo/Formula/ | ||
mv comfy-cli.rb homebrew-repo/Formula/ | ||
- name: Install Comfy CLI using Homebrew Formula | ||
run: | | ||
brew install --build-from-source ./Formula/comfy-cli.rb | ||
brew install --build-from-source ./homebrew-repo/Formula/comfy-cli.rb | ||
comfy --help | ||
brew uninstall comfy-cli | ||
- name: Commit and Push Formula | ||
run: | | ||
mv comfy-cli.rb homebrew-repo/Formula/ | ||
cd homebrew-repo | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add Formula/comfy-cli.rb | ||
git commit -m "Update comfy-cli formula to version $VERSION" | ||
git add Formula/comfy-cli.rb Formula/comfy-cli@${{ env.VERSION }}.rb | ||
git commit -m "Update comfy-cli to latest and version ${VERSION}" | ||
git push | ||
env: | ||
GIT_COMMITTER_NAME: github-actions | ||
|
@@ -121,17 +128,29 @@ jobs: | |
|
||
|
||
test-homebrew-installation: | ||
name: Test Comfy CLI Installation via homebrew | ||
needs: publish-homebrew-tap # This job runs after build-n-publish completes successfully | ||
name: Test Comfy CLI Installation via Homebrew | ||
needs: publish-homebrew-tap # This job runs after publish-homebrew-tap completes successfully | ||
runs-on: macos-latest | ||
steps: | ||
- name: Tap comfy-cli homebrew tap repository | ||
- name: Tap Comfy CLI Homebrew tap repository | ||
run: brew tap Comfy-Org/comfy-cli | ||
|
||
- name: Install comfy-cli via homebrew | ||
- name: Install comfy-cli latest via Homebrew | ||
run: brew install comfy-org/comfy-cli/comfy-cli | ||
|
||
- name: Test Comfy CLI Help | ||
|
||
- name: Test comfy-cli latest Help | ||
run: comfy --help | ||
|
||
- name: Uninstall comfy-cli latest | ||
run: brew uninstall comfy-cli | ||
|
||
- name: Install comfy-cli versioned via Homebrew | ||
run: brew install comfy-org/comfy-cli/comfy-cli@${{ env.VERSION }} | ||
|
||
- name: Test comfy-cli versioned Help | ||
run: comfy --help | ||
|
||
- name: Uninstall comfy-cli versioned | ||
run: brew uninstall comfy-cli@${{ env.VERSION }} | ||
|
||
|