Skip to content

Commit b73f8e5

Browse files
ulises-jeremiasulises-jeremias
andauthored
ci: publish core and CLI to PyPI in separate steps (#153)
Allows create-python-app-core to succeed when the CLI Trusted Publisher is not registered yet (CLI step is continue-on-error). Co-authored-by: ulises-jeremias <ulises.jeremias@users.noreply.github.com>
1 parent 703136c commit b73f8e5

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ jobs:
2525
with:
2626
python-version-file: .python-version
2727
- run: uv sync --group dev
28-
# Publish core first so the CLI wheel can resolve create-python-app-core on PyPI.
2928
- name: Build packages
3029
run: |
31-
uv build --package create-python-app-core
32-
uv build --package create-awesome-python-app
33-
ls -la dist/
30+
mkdir -p dist-core dist-cli
31+
uv build --package create-python-app-core --out-dir dist-core
32+
uv build --package create-awesome-python-app --out-dir dist-cli
33+
# Combined tree for GitHub Release assets
34+
mkdir -p dist
35+
cp dist-core/* dist-cli/* dist/
36+
ls -la dist-core dist-cli dist
3437
- name: Create GitHub Release
3538
if: startsWith(github.ref, 'refs/tags/')
3639
uses: softprops/action-gh-release@v2
@@ -44,8 +47,14 @@ jobs:
4447
```
4548
4649
Catalog: https://github.com/Create-Python-App/cpa-templates
47-
- name: Publish to PyPI (OIDC)
50+
- name: Publish create-python-app-core to PyPI
4851
if: startsWith(github.ref, 'refs/tags/')
4952
uses: pypa/gh-action-pypi-publish@release/v1
5053
with:
51-
packages-dir: dist/
54+
packages-dir: dist-core/
55+
- name: Publish create-awesome-python-app to PyPI
56+
if: startsWith(github.ref, 'refs/tags/')
57+
continue-on-error: true
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
packages-dir: dist-cli/

0 commit comments

Comments
 (0)