From 52510c28a8e3327f0887094be2b9d573ca8f5f31 Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Thu, 16 Jul 2026 11:29:18 -0300 Subject: [PATCH] ci: publish core and CLI to PyPI in separate steps Allows create-python-app-core to succeed when the CLI Trusted Publisher is not registered yet (CLI step is continue-on-error). --- .github/workflows/publish.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9419bdc..016ffd4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,12 +25,15 @@ jobs: with: python-version-file: .python-version - run: uv sync --group dev - # Publish core first so the CLI wheel can resolve create-python-app-core on PyPI. - name: Build packages run: | - uv build --package create-python-app-core - uv build --package create-awesome-python-app - ls -la dist/ + mkdir -p dist-core dist-cli + uv build --package create-python-app-core --out-dir dist-core + uv build --package create-awesome-python-app --out-dir dist-cli + # Combined tree for GitHub Release assets + mkdir -p dist + cp dist-core/* dist-cli/* dist/ + ls -la dist-core dist-cli dist - name: Create GitHub Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 @@ -44,8 +47,14 @@ jobs: ``` Catalog: https://github.com/Create-Python-App/cpa-templates - - name: Publish to PyPI (OIDC) + - name: Publish create-python-app-core to PyPI if: startsWith(github.ref, 'refs/tags/') uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist/ + packages-dir: dist-core/ + - name: Publish create-awesome-python-app to PyPI + if: startsWith(github.ref, 'refs/tags/') + continue-on-error: true + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist-cli/