-
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
0c43294
commit f84a237
Showing
1 changed file
with
67 additions
and
24 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-pypi: | ||
build-n-publish-test-pypi: | ||
name: Build and publish Python distributions to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
|
@@ -36,15 +36,78 @@ jobs: | |
uses: pypa/[email protected] | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
test-pypi-test-installation: | ||
name: Test Comfy CLI Installation via Test PyPi | ||
needs: build-n-publish-test-pypi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
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 -i https://test.pypi.org/simple/ comfy-cli==${{env.VERSION}} | ||
|
||
- name: Test Comfy CLI Help | ||
run: comfy --help | ||
|
||
build-n-publish-pypi: | ||
name: Build and publish Python distributions to Official PyPI | ||
needs: test-pypi-test-installation | ||
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: | | ||
pip install -i https://test.pypi.org/simple/ comfy-cli==${{env.VERSION}} | ||
comfy --help | ||
sed -i "s/version = \".*\"/version = \"${{ env.VERSION }}\"/" pyproject.toml | ||
- name: Build distribution | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
|
||
- name: Publish distribution to Official PyPI | ||
uses: pypa/[email protected] | ||
|
||
|
||
test-pip-installation: | ||
name: Test Comfy CLI Installation via pip | ||
needs: build-n-publish-pypi # 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: 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==${{env.VERSION}} | ||
|
||
- name: Test Comfy CLI Help | ||
run: comfy --help | ||
|
||
publish-homebrew-tap: | ||
runs-on: ubuntu-latest | ||
needs: build-n-publish-pypi | ||
|
@@ -108,24 +171,4 @@ 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 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
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==${{env.VERSION}} | ||
|
||
- name: Test Comfy CLI Help | ||
run: comfy --help | ||
|