From 754f3dba501373a827288d0824fab841ae6f8f00 Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Thu, 16 Jul 2026 10:54:02 -0300 Subject: [PATCH] chore(release): prepare 0.1.0 PyPI packages Bump create-python-app-core and create-awesome-python-app to 0.1.0, publish both from the Release workflow, and document dual Trusted Publishers. Closes #148 --- .github/workflows/publish.yml | 15 ++++++++- CHANGELOG.md | 16 +++++++++ README.md | 13 +++++--- docs/DISTRIBUTION_SETUP.md | 33 ++++++++++++++++--- .../create-awesome-python-app/pyproject.toml | 13 ++++++-- .../src/create_awesome_python_app/__init__.py | 2 +- .../tests/test_cli.py | 2 +- .../create-python-app-core/pyproject.toml | 10 ++++-- .../src/create_python_app_core/_version.py | 2 +- .../tests/test_version.py | 4 +-- uv.lock | 4 +-- 11 files changed, 93 insertions(+), 21 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 11919f1..3821325 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,12 +24,25 @@ jobs: with: python-version-file: .python-version - run: uv sync --group dev - - run: uv build --package create-awesome-python-app + # 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/ - name: Create GitHub Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 with: files: dist/* + body: | + First public release. Install with: + + ```bash + uvx create-awesome-python-app@0.1.0 --help + ``` + + Catalog: https://github.com/Create-Python-App/cpa-templates - name: Publish to PyPI (OIDC) if: startsWith(github.ref, 'refs/tags/') uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..66fc4a4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## 0.1.0 + +First public release of: + +- `create-python-app-core` — scaffolding engine (Jinja `.template` / `.append`, `pyproject.toml` merge, git cache, `file://` / GitHub sources) +- `create-awesome-python-app` — Typer CLI + +Default template catalog: `Create-Python-App/cpa-templates` (`templates.json`). + +### Install + +```bash +uvx create-awesome-python-app@0.1.0 my-api --template fastapi-starter --no-interactive +``` diff --git a/README.md b/README.md index b222a01..0e3a003 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![CI Tests](https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml) [![Lint](https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml) [![Typecheck](https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml) +[![PyPI](https://img.shields.io/pypi/v/create-awesome-python-app.svg)](https://pypi.org/project/create-awesome-python-app/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE) @@ -24,15 +25,19 @@ The CLI fetches the catalog from: Override with `CPA_CATALOG_URL` for forks or local testing (`file://` supported). -## Install (preview) - -Once published to PyPI: +## Install ```bash uvx create-awesome-python-app@latest my-app ``` -Until the first release, use the workspace CLI: +Or pin a version: + +```bash +uvx create-awesome-python-app@0.1.0 my-app --template fastapi-starter --no-interactive +``` + +From this workspace (development): ```bash uv sync diff --git a/docs/DISTRIBUTION_SETUP.md b/docs/DISTRIBUTION_SETUP.md index ba8ce70..d0e13e5 100644 --- a/docs/DISTRIBUTION_SETUP.md +++ b/docs/DISTRIBUTION_SETUP.md @@ -13,10 +13,35 @@ Configure secrets under **Settings → Secrets and variables → Actions**. ## PyPI Trusted Publishing -1. On PyPI, add a Trusted Publisher for project `create-awesome-python-app` -2. Owner/repo: `Create-Python-App/create-python-app` -3. Workflow name: `publish.yml` -4. Environment: (optional) +Configure **two** pending Trusted Publishers on PyPI (same workflow publishes both packages): + +### `create-python-app-core` + +1. Owner: `Create-Python-App` +2. Repository: `create-python-app` +3. Workflow: `publish.yml` +4. Environment: (leave empty unless you use one) + +### `create-awesome-python-app` + +Same owner/repo/workflow as above. + +On the first tag `create-awesome-python-app@0.1.0`, OIDC creates the projects and uploads sdists/wheels for both packages. + +## Cutting a release + +1. Bump versions in both package `pyproject.toml` files and `__version__` / `_version.py` +2. Update `CHANGELOG.md` +3. Merge to `main` +4. Tag and push: + +```bash +git tag create-awesome-python-app@0.1.0 +git push origin create-awesome-python-app@0.1.0 +``` + +5. Confirm the Release workflow published both packages +6. Smoke: `uvx create-awesome-python-app@0.1.0 --help` ## Docker Hub diff --git a/packages/create-awesome-python-app/pyproject.toml b/packages/create-awesome-python-app/pyproject.toml index 2c21c91..bc76970 100644 --- a/packages/create-awesome-python-app/pyproject.toml +++ b/packages/create-awesome-python-app/pyproject.toml @@ -1,16 +1,23 @@ [project] name = "create-awesome-python-app" -version = "0.0.0" -description = "Composable scaffolding CLI for production-ready Python apps (stub)" +version = "0.1.0" +description = "Composable scaffolding CLI for production-ready Python apps" readme = "README.md" requires-python = ">=3.12" +license = "MIT" dependencies = [ - "create-python-app-core", + "create-python-app-core>=0.1.0", "questionary>=2.1.1", "rich>=15.0.0", "typer>=0.27.0", ] +[project.urls] +Homepage = "https://github.com/Create-Python-App/create-python-app" +Repository = "https://github.com/Create-Python-App/create-python-app" +Issues = "https://github.com/Create-Python-App/create-python-app/issues" +Changelog = "https://github.com/Create-Python-App/create-python-app/blob/main/CHANGELOG.md" + [project.scripts] create-awesome-python-app = "create_awesome_python_app.cli:main" diff --git a/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py b/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py index 3bb77b5..b00e798 100644 --- a/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py +++ b/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py @@ -1,3 +1,3 @@ """Create Awesome Python App CLI.""" -__version__ = "0.0.0" +__version__ = "0.1.0" diff --git a/packages/create-awesome-python-app/tests/test_cli.py b/packages/create-awesome-python-app/tests/test_cli.py index e93738d..acd3bd6 100644 --- a/packages/create-awesome-python-app/tests/test_cli.py +++ b/packages/create-awesome-python-app/tests/test_cli.py @@ -8,7 +8,7 @@ def test_version() -> None: result = runner.invoke(app, ["--version"]) assert result.exit_code == 0 combined = result.stdout + result.stderr - assert "0.0.0" in combined + assert "0.1.0" in combined def test_help() -> None: diff --git a/packages/create-python-app-core/pyproject.toml b/packages/create-python-app-core/pyproject.toml index 541e175..01fc63b 100644 --- a/packages/create-python-app-core/pyproject.toml +++ b/packages/create-python-app-core/pyproject.toml @@ -1,9 +1,10 @@ [project] name = "create-python-app-core" -version = "0.0.0" -description = "Scaffolding engine for Create Awesome Python App (stub)" +version = "0.1.0" +description = "Scaffolding engine for Create Awesome Python App" readme = "README.md" requires-python = ">=3.12" +license = "MIT" dependencies = [ "httpx>=0.28.1", "jinja2>=3.1.0", @@ -11,6 +12,11 @@ dependencies = [ "tomlkit>=0.13.0", ] +[project.urls] +Homepage = "https://github.com/Create-Python-App/create-python-app" +Repository = "https://github.com/Create-Python-App/create-python-app" +Issues = "https://github.com/Create-Python-App/create-python-app/issues" + [build-system] requires = ["hatchling"] build-backend = "hatchling.build" diff --git a/packages/create-python-app-core/src/create_python_app_core/_version.py b/packages/create-python-app-core/src/create_python_app_core/_version.py index 6c8e6b9..3dc1f76 100644 --- a/packages/create-python-app-core/src/create_python_app_core/_version.py +++ b/packages/create-python-app-core/src/create_python_app_core/_version.py @@ -1 +1 @@ -__version__ = "0.0.0" +__version__ = "0.1.0" diff --git a/packages/create-python-app-core/tests/test_version.py b/packages/create-python-app-core/tests/test_version.py index f513cfc..67a2cde 100644 --- a/packages/create-python-app-core/tests/test_version.py +++ b/packages/create-python-app-core/tests/test_version.py @@ -1,8 +1,8 @@ from create_python_app_core import CPA_USER_AGENT, __version__ -def test_version_is_semver_stub() -> None: - assert __version__ == "0.0.0" +def test_version_is_semver() -> None: + assert __version__ == "0.1.0" def test_user_agent_contains_version() -> None: diff --git a/uv.lock b/uv.lock index 988611a..b2c2674 100644 --- a/uv.lock +++ b/uv.lock @@ -138,7 +138,7 @@ wheels = [ [[package]] name = "create-awesome-python-app" -version = "0.0.0" +version = "0.1.0" source = { editable = "packages/create-awesome-python-app" } dependencies = [ { name = "create-python-app-core" }, @@ -157,7 +157,7 @@ requires-dist = [ [[package]] name = "create-python-app-core" -version = "0.0.0" +version = "0.1.0" source = { editable = "packages/create-python-app-core" } dependencies = [ { name = "httpx" },