From fe640c6c337e02dba6df335af84ba7e019f68eba Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Thu, 16 Jul 2026 03:18:17 -0300 Subject: [PATCH] ci: release workflow skeleton Closes #52 Co-authored-by: Cursor --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ docs/VERSIONING.md | 9 +++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 docs/VERSIONING.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..63b25f3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Release +on: + push: + tags: + - "create-awesome-python-app@*" + workflow_dispatch: + inputs: + tag: + description: "Tag name (create-awesome-python-app@X.Y.Z)" + required: false +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: true +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + - uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - run: uv sync --group dev + - run: uv build --package create-awesome-python-app + - name: Create GitHub Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: dist/* + - name: Publish to PyPI (OIDC) + if: startsWith(github.ref, 'refs/tags/') + run: echo "PyPI trusted publishing wired in #58 — placeholder job" diff --git a/docs/VERSIONING.md b/docs/VERSIONING.md new file mode 100644 index 0000000..4429a0d --- /dev/null +++ b/docs/VERSIONING.md @@ -0,0 +1,9 @@ +# Versioning + +CPA uses **GitHub Releases + tags** with hatchling package versions. + +Recommended flow (release-please or manual tags): + +1. Bump `version` in package pyproject.toml files +2. Tag `create-awesome-python-app@X.Y.Z` +3. `publish.yml` builds and publishes to PyPI via OIDC (see #58)