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/