From aedf156f2839f8cb843c8826a5232d1cba1ae03a Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Fri, 19 Jun 2026 13:40:01 +0100 Subject: [PATCH 1/2] chore: take over publishing with release-please MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the legacy tag-driven ci.yml publish flow with release-please as the single owner of versioning, changelogs, and PyPI publishes. What changes: - Add release-please-config.json (release-type python, package speechify-api, extra-files tracks src/speechify/core/client_wrapper.py via the x-release-please-version marker comment) - Add .release-please-manifest.json pinned to 1.2.3 — the current GitHub Release marked Latest, matching the PyPI latest and the pyproject.toml version on master - Add .github/workflows/release-please.yml: compile (poetry + mypy) and test (poetry + pytest) on every push to master and every PR; then release-please on master; then poetry publish --build to PyPI gated on release_created - Remove .github/workflows/ci.yml — the new workflow covers compile, test, and publish - Add the inline x-release-please-version marker next to the existing X-Fern-SDK-Version literal in client_wrapper.py (literal stays at 1.2.3) - Expand .fernignore to keep Fern regen from wiping the release-please artifacts, the new workflow, the deleted ci.yml, and client_wrapper.py No version literal changes anywhere. pyproject.toml stays at 1.2.3, the X-Fern-SDK-Version literal stays at 1.2.3 — release-please will propose the correct next bump on the next conventional commit. --- .fernignore | 16 +++++- .../workflows/{ci.yml => release-please.yml} | 57 ++++++++++++++----- .release-please-manifest.json | 3 + release-please-config.json | 17 ++++++ src/speechify/core/client_wrapper.py | 2 +- 5 files changed, 78 insertions(+), 17 deletions(-) rename .github/workflows/{ci.yml => release-please.yml} (50%) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.fernignore b/.fernignore index fcd26fa..c715e71 100644 --- a/.fernignore +++ b/.fernignore @@ -1,2 +1,16 @@ # Specify files that shouldn't be modified by Fern -.github/workflows/ci.yml \ No newline at end of file + +# Legacy CI workflow replaced by release-please.yml — keep listed so Fern +# does not regenerate the file after deletion. +.github/workflows/ci.yml + +# Release-please owns versioning, releases, and PyPI publish. +.github/workflows/release-please.yml +release-please-config.json +.release-please-manifest.json +CHANGELOG.md + +# release-please bumps the X-Fern-SDK-Version literal in this file via an +# inline `x-release-please-version` marker comment. Fern regen would strip the +# marker, so the file is owned outside of Fern. +src/speechify/core/client_wrapper.py \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/release-please.yml similarity index 50% rename from .github/workflows/ci.yml rename to .github/workflows/release-please.yml index 7d41c65..19d852a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/release-please.yml @@ -1,16 +1,24 @@ -name: ci +name: release-please + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read -on: [push] jobs: compile: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.8" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -18,41 +26,60 @@ jobs: run: poetry install - name: Compile run: poetry run mypy . + test: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.8" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - name: Install dependencies run: poetry install - - name: Test run: poetry run pytest -rP . - publish: + release-please: needs: [compile, test] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + steps: + - name: Run release-please + id: release + uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + + publish: + needs: release-please + if: needs.release-please.outputs.release_created == 'true' runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.8" - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - name: Install dependencies run: poetry install - - name: Publish to pypi + - name: Publish to PyPI run: | poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} poetry publish --build diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..b7298f8 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.2.3" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..3d10873 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "python", + "include-v-in-tag": false, + "include-component-in-tag": false, + "packages": { + ".": { + "package-name": "speechify-api", + "extra-files": [ + { + "type": "generic", + "path": "src/speechify/core/client_wrapper.py" + } + ] + } + } +} diff --git a/src/speechify/core/client_wrapper.py b/src/speechify/core/client_wrapper.py index 71accb2..1c0ca85 100644 --- a/src/speechify/core/client_wrapper.py +++ b/src/speechify/core/client_wrapper.py @@ -22,7 +22,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "speechify-api", - "X-Fern-SDK-Version": "1.2.3", + "X-Fern-SDK-Version": "1.2.3", # x-release-please-version } token = self._get_token() if token is not None: From 5558de2bb8d264c36dc73120f3fc2a174c06ccd0 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:09:12 +0100 Subject: [PATCH 2/2] chore: let Fern regen replay over client_wrapper.py Drop src/speechify/core/client_wrapper.py from .fernignore. Fern's regen replay re-applies release-please's commits (the x-release-please-version marker + the version bump) on top of the regenerated file, so we don't need to freeze it out of regen entirely. --- .fernignore | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.fernignore b/.fernignore index c715e71..a25a56b 100644 --- a/.fernignore +++ b/.fernignore @@ -8,9 +8,4 @@ .github/workflows/release-please.yml release-please-config.json .release-please-manifest.json -CHANGELOG.md - -# release-please bumps the X-Fern-SDK-Version literal in this file via an -# inline `x-release-please-version` marker comment. Fern regen would strip the -# marker, so the file is owned outside of Fern. -src/speechify/core/client_wrapper.py \ No newline at end of file +CHANGELOG.md \ No newline at end of file