Skip to content

Commit

Permalink
Update publish_package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 committed May 9, 2024
1 parent a3f0a37 commit 02c330e
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ jobs:
- name: Build distribution
run: python -m build --sdist --wheel --outdir dist/

- name: Publish distribution to PyPI
- name: Publish distribution to TestPyPI for Validation
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
repository_url: https://test.pypi.org/legacy/

- name: Install Comfy CLI via pip
run: |
pip install --index-url https://test.pypi.org/simple/ comfy-cli==$VERSION
comfy --help
- name: Publish distribution to Official PyPI
uses: pypa/gh-action-pypi-publish@v1.8.14

publish-homebrew-tap:
runs-on: ubuntu-latest
needs: build-n-publish-pypi
Expand All @@ -61,6 +71,12 @@ jobs:
source venv/bin/activate
poet -f comfy-cli==$VERSION > comfy-cli.rb
- name: Install Comfy CLI using Homebrew Formula
run: |
brew install --build-from-source ./Formula/comfy-cli.rb
comfy --help
brew uninstall comfy-cli
- name: Commit and Push Formula
run: |
mv comfy-cli.rb homebrew-repo/Formula/
Expand All @@ -77,6 +93,7 @@ jobs:
GIT_AUTHOR_EMAIL: github-actions@github.com
GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}


test-homebrew-installation:
name: Test Comfy CLI Installation via homebrew
needs: publish-homebrew-tap # This job runs after build-n-publish completes successfully
Expand All @@ -91,6 +108,7 @@ jobs:
- name: Test Comfy CLI Help
run: comfy --help


test-pip-installation:
name: Test Comfy CLI Installation via pip
needs: build-n-publish-pypi # This job runs after build-n-publish completes successfully
Expand All @@ -101,8 +119,13 @@ jobs:
with:
python-version: '3.10'

- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Install Comfy CLI via pip
run: pip install comfy-cli
run: pip install comfy-cli==$VERSION

- name: Test Comfy CLI Help
run: comfy --help

0 comments on commit 02c330e

Please sign in to comment.