@@ -81,36 +81,43 @@ jobs:
81
81
repository : ' Comfy-Org/homebrew-comfy-cli'
82
82
token : ${{ secrets.COMMITTER_TOKEN }}
83
83
path : ' homebrew-repo'
84
-
84
+
85
85
- name : Extract version from tag
86
86
id : get_version
87
87
run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
88
-
88
+
89
89
- name : Set up Python environment
90
90
run : |
91
91
python3 -m venv venv
92
92
source venv/bin/activate
93
93
pip install comfy-cli==$VERSION homebrew-pypi-poet
94
-
94
+
95
95
- name : Generate Homebrew Formula
96
96
run : |
97
97
source venv/bin/activate
98
- poet -f comfy-cli==$VERSION > comfy-cli.rb
99
-
98
+ poet -f comfy-cli==$VERSION > comfy-cli@${{ env.VERSION }}.rb
99
+
100
+ - name : Copy Version Formula as Latest
101
+ run : cp comfy-cli@${{ env.VERSION }}.rb comfy-cli.rb
102
+
103
+ - name : Move Formulas to Tap Directory
104
+ run : |
105
+ mv comfy-cli@${{ env.VERSION }}.rb homebrew-repo/Formula/
106
+ mv comfy-cli.rb homebrew-repo/Formula/
107
+
100
108
- name : Install Comfy CLI using Homebrew Formula
101
109
run : |
102
- brew install --build-from-source ./Formula/comfy-cli.rb
110
+ brew install --build-from-source ./homebrew-repo/ Formula/comfy-cli.rb
103
111
comfy --help
104
112
brew uninstall comfy-cli
105
-
113
+
106
114
- name : Commit and Push Formula
107
115
run : |
108
- mv comfy-cli.rb homebrew-repo/Formula/
109
116
cd homebrew-repo
110
117
git config user.name github-actions
111
118
git config user.email [email protected]
112
- git add Formula/comfy-cli.rb
113
- git commit -m "Update comfy-cli formula to version $VERSION"
119
+ git add Formula/comfy-cli.rb Formula/comfy-cli@${{ env.VERSION }}.rb
120
+ git commit -m "Update comfy-cli to latest and version ${ VERSION} "
114
121
git push
115
122
env :
116
123
GIT_COMMITTER_NAME : github-actions
@@ -121,17 +128,29 @@ jobs:
121
128
122
129
123
130
test-homebrew-installation :
124
- name : Test Comfy CLI Installation via homebrew
125
- needs : publish-homebrew-tap # This job runs after build-n-publish completes successfully
131
+ name : Test Comfy CLI Installation via Homebrew
132
+ needs : publish-homebrew-tap # This job runs after publish-homebrew-tap completes successfully
126
133
runs-on : macos-latest
127
134
steps :
128
- - name : Tap comfy-cli homebrew tap repository
135
+ - name : Tap Comfy CLI Homebrew tap repository
129
136
run : brew tap Comfy-Org/comfy-cli
130
-
131
- - name : Install comfy-cli via homebrew
137
+
138
+ - name : Install comfy-cli latest via Homebrew
132
139
run : brew install comfy-org/comfy-cli/comfy-cli
133
-
134
- - name : Test Comfy CLI Help
140
+
141
+ - name : Test comfy-cli latest Help
142
+ run : comfy --help
143
+
144
+ - name : Uninstall comfy-cli latest
145
+ run : brew uninstall comfy-cli
146
+
147
+ - name : Install comfy-cli versioned via Homebrew
148
+ run : brew install comfy-org/comfy-cli/comfy-cli@${{ env.VERSION }}
149
+
150
+ - name : Test comfy-cli versioned Help
135
151
run : comfy --help
152
+
153
+ - name : Uninstall comfy-cli versioned
154
+ run : brew uninstall comfy-cli@${{ env.VERSION }}
136
155
137
156
0 commit comments