Skip to content

Commit 11d5cdc

Browse files
authored
Update publish_package.yml
1 parent e1d1ae9 commit 11d5cdc

File tree

1 file changed

+12
-49
lines changed

1 file changed

+12
-49
lines changed

.github/workflows/publish_package.yml

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [ created ]
66

77
jobs:
8-
build-n-publish-test-pypi:
8+
build-n-publish-pypi:
99
name: Build and publish Python distributions to PyPI
1010
runs-on: ubuntu-latest
1111
permissions:
@@ -36,57 +36,20 @@ jobs:
3636
uses: pypa/gh-action-pypi-publish@v1.8.14
3737
with:
3838
repository_url: https://test.pypi.org/legacy/
39-
40-
test-pypi-test-installation:
41-
name: Test Comfy CLI Installation via Test PyPi
42-
needs: build-n-publish-test-pypi
43-
runs-on: ubuntu-latest
44-
steps:
45-
- name: Set up Python
46-
uses: actions/setup-python@v4
47-
with:
48-
python-version: '3.10'
49-
50-
- name: Extract version from tag
51-
id: get_version
52-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
53-
54-
- name: Install Comfy CLI via pip
55-
run: pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple comfy-cli==${{env.VERSION}}
56-
57-
- name: Test Comfy CLI Help
58-
run: comfy --help
59-
60-
build-n-publish-pypi:
61-
name: Build and publish Python distributions to Official PyPI
62-
needs: test-pypi-test-installation
63-
runs-on: ubuntu-latest
64-
permissions:
65-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
66-
steps:
67-
- uses: actions/checkout@v3
68-
69-
- name: Set up Python 3.10
70-
uses: actions/setup-python@v4
71-
with:
72-
python-version: '3.10'
73-
74-
- name: Install build and tomlkit dependencies
75-
run: python -m pip install --upgrade pip build tomlkit
76-
77-
- name: Extract version from tag
78-
id: get_version
79-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
39+
40+
- name: Wait for Test PyPI availability
41+
run: sleep 60 # Wait for 1 minute
8042

81-
- name: Update version in pyproject.toml
43+
- name: Install Comfy CLI from Test Pypi and Test
8244
run: |
83-
sed -i "s/version = \".*\"/version = \"${{ env.VERSION }}\"/" pyproject.toml
45+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple comfy-cli==${{env.VERSION}}
46+
comfy --help
8447
85-
- name: Build distribution
86-
run: python -m build --sdist --wheel --outdir dist/
87-
8848
- name: Publish distribution to Official PyPI
8949
uses: pypa/gh-action-pypi-publish@v1.8.14
50+
51+
- name: Wait for PyPI availability
52+
run: sleep 60 # Wait for 1 minute
9053

9154
test-pip-installation:
9255
name: Test Comfy CLI Installation via pip
@@ -102,14 +65,14 @@ jobs:
10265
id: get_version
10366
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
10467

105-
- name: Install Comfy CLI via pip
68+
- name: Install Comfy CLI via pip and Test
10669
run: pip install comfy-cli==${{env.VERSION}}
10770

10871
- name: Test Comfy CLI Help
10972
run: comfy --help
11073

11174
publish-homebrew-tap:
112-
runs-on: ubuntu-latest
75+
runs-on: macos-latest # Use macOS runner where Homebrew is pre-installed
11376
needs: build-n-publish-pypi
11477
steps:
11578
- name: Checkout code

0 commit comments

Comments
 (0)