From 269d6662aa58192dbc0b5748876e388c47d1ea68 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Fri, 19 Jun 2026 13:40:14 +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 npm publishes — matching the pattern being introduced on speechify-api-sdk-python in parallel. What changes: - Add release-please-config.json (release-type node, package @speechify/api, extra-files tracks src/version.ts via the x-release-please-version marker) - Add .release-please-manifest.json pinned to 1.0.2 — the current GitHub Release marked Latest, matching package.json + every X-Fern-SDK-Version literal across src/api/resources/**/Client.ts on master - Add .github/workflows/release-please.yml: compile (yarn build) and test (yarn test) on every push to master and every PR; then release-please on master; then npm publish --provenance --access public on release. Alpha/beta tag detection lifts from the deleted ci.yml unchanged, now reading the release-please-emitted tag_name instead of GITHUB_REF. Publish still flows through the existing GitHub OIDC trusted publisher on npm (no NPM_TOKEN needed) - 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 SDK_VERSION literal in src/version.ts (literal stays at 1.0.2) - Expand .fernignore to keep Fern regen from wiping the release-please artifacts, the new workflow, the deleted ci.yml, and src/version.ts No version literal changes anywhere. package.json stays at 1.0.2 to match the GitHub Release. (npm latest dist-tag is currently behind at 1.0.1 because the 1.0.2 publish never landed there; the next release this workflow cuts will catch npm back up.) Verified: yarn build passes; yarn test passes 255/255. --- .fernignore | 14 +++++ .github/workflows/ci.yml | 65 --------------------- .github/workflows/release-please.yml | 85 ++++++++++++++++++++++++++++ .release-please-manifest.json | 3 + release-please-config.json | 17 ++++++ src/version.ts | 2 +- 6 files changed, 120 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.fernignore b/.fernignore index 5b3cc70..fa9861e 100644 --- a/.fernignore +++ b/.fernignore @@ -1,5 +1,19 @@ # Specify files that shouldn't be modified by Fern + +# 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 npm publish. +.github/workflows/release-please.yml +release-please-config.json +.release-please-manifest.json +CHANGELOG.md + +# release-please bumps the 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/version.ts + # ignore context7 config file context7.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9dfc527..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: '24' - - - name: Compile - run: yarn && yarn build - - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: '24' - - - name: Test - run: yarn && yarn test - - publish: - needs: [compile, test] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: '24' - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: yarn install - - - name: Build - run: yarn build - - - name: Publish to npm - run: | - if [[ ${GITHUB_REF} == *alpha* ]]; then - npm publish --provenance --access public --tag alpha - elif [[ ${GITHUB_REF} == *beta* ]]; then - npm publish --provenance --access public --tag beta - else - npm publish --provenance --access public - fi diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..ea27959 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,85 @@ +name: release-please + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: "24" + - name: Compile + run: yarn && yarn build + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: "24" + - name: Test + run: yarn && yarn test + + release-please: + needs: [compile, test] + 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 + permissions: + contents: read + id-token: write + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: "24" + registry-url: "https://registry.npmjs.org" + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Publish to npm + env: + TAG_NAME: ${{ needs.release-please.outputs.tag_name }} + run: | + if [[ "$TAG_NAME" == *alpha* ]]; then + npm publish --provenance --access public --tag alpha + elif [[ "$TAG_NAME" == *beta* ]]; then + npm publish --provenance --access public --tag beta + else + npm publish --provenance --access public + fi diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..b870c5e --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.2" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..8f382fb --- /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": "node", + "include-v-in-tag": false, + "include-component-in-tag": false, + "packages": { + ".": { + "package-name": "@speechify/api", + "extra-files": [ + { + "type": "generic", + "path": "src/version.ts" + } + ] + } + } +} diff --git a/src/version.ts b/src/version.ts index 8c6c142..b75d17c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "1.0.2"; +export const SDK_VERSION = "1.0.2"; // x-release-please-version From 3e8ea41a7ce6e44531dbd37aeb64aae6db68fe47 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:09:18 +0100 Subject: [PATCH 2/2] chore: let Fern regen replay over src/version.ts Drop src/version.ts from .fernignore. Fern's regen replay re-applies release-please's commits (the x-release-please-version marker + the SDK_VERSION bump) on top of the regenerated file, so we don't need to freeze it out of regen entirely. --- .fernignore | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.fernignore b/.fernignore index fa9861e..7f697f3 100644 --- a/.fernignore +++ b/.fernignore @@ -10,10 +10,5 @@ release-please-config.json .release-please-manifest.json CHANGELOG.md -# release-please bumps the 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/version.ts - # ignore context7 config file context7.json