v0.0.21.dev0 #25
Workflow file for this run
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
name: Publish and Update Formula | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python distributions to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install build and tomlkit dependencies | |
run: python -m pip install --upgrade pip build tomlkit | |
- name: Extract version from tag | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Update version in pyproject.toml | |
run: | | |
sed -i "s/version = \".*\"/version = \"${{ env.VERSION }}\"/" pyproject.toml | |
- name: Build distribution | |
run: python -m build --sdist --wheel --outdir dist/ | |
- 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 }} | |
Created by actions/bump-homebrew-formula-action | |
test-homebrew-installation: | |
name: Test Comfy CLI Installation via homebrew | |
needs: build-n-publish # This job runs after build-n-publish completes successfully | |
runs-on: macos-latest | |
steps: | |
- name: Tap comfy-cli homebrew tap repository | |
run: brew tap Comfy-Org/comfy-cli | |
- name: Install comfy-cli via homebrew | |
run: brew install comfy-org/comfy-cli/comfy-cli | |
- name: Test Comfy CLI Help | |
run: comfy --help | |
test-pip-installation: | |
name: Test Comfy CLI Installation via pip | |
needs: build-n-publish # This job runs after build-n-publish completes successfully | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Comfy CLI via pip | |
run: pip install comfy-cli | |
- name: Test Comfy CLI Help | |
run: comfy --help |