diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2880e1..45e016c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,18 +1,41 @@ name: publish on: + push: + branches: [main] release: types: [published] -permissions: - contents: read - id-token: write - jobs: + release-please: + if: github.event_name == 'push' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + release_created: ${{ steps.release.outputs.release_created }} + sha: ${{ steps.release.outputs.sha }} + steps: + - id: release + uses: googleapis/release-please-action@v5 + + # Publishing lives in this file because npm trusted publishing is bound to + # publish.yml. A release created by release-please with GITHUB_TOKEN does not + # fire the `release` event, so the push run publishes it here instead. publish: + needs: release-please + if: ${{ !cancelled() && (github.event_name == 'release' || needs.release-please.outputs.release_created == 'true') }} runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: + # Overlapping pushes can make a later run create an earlier release, so + # build the tagged commit rather than the commit that triggered this run. - uses: actions/checkout@v6 + with: + ref: ${{ needs.release-please.outputs.sha || github.sha }} - name: setup node uses: actions/setup-node@v6 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..ce65b73 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "5.3.0" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1f554..79fbe11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. +## [5.3.0] + +Tagged on GitHub but never published to npm, because `package.json` was not bumped before the release. These changes ship to npm in the next release. + +#### Added + +- **`cc`** on transactional email requests. ([#247](https://github.com/customerio/customerio-node/pull/247)) + +#### Fixed + +- **`SendWhatsAppRequest`** no longer sends a `from` field. ([#250](https://github.com/customerio/customerio-node/pull/250)) + ## [5.2.0] This release completes the App API surface: `APIClient` now covers the full Customer.io [Journeys App API](https://docs.customer.io/api/app/). Every endpoint was verified against the live API behavior, with unit and live integration coverage. diff --git a/lib/version.ts b/lib/version.ts index 6f577f9..b890778 100644 --- a/lib/version.ts +++ b/lib/version.ts @@ -1 +1 @@ -export const version = '5.2.0'; +export const version = '5.2.0'; // x-release-please-version diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..5ddaab4 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "node", + "include-component-in-tag": false, + "extra-files": ["lib/version.ts"] + } + } +} diff --git a/scripts/sync-version.js b/scripts/sync-version.js index 6414f46..4d2e93b 100644 --- a/scripts/sync-version.js +++ b/scripts/sync-version.js @@ -2,4 +2,8 @@ const { version } = require('../package.json'); const { resolve } = require('path'); const { writeFileSync } = require('fs'); -writeFileSync(resolve(__dirname, '..', 'lib', 'version.ts'), `export const version = '${version}';\n`); +// The marker lets release-please bump this file in its release PR. +writeFileSync( + resolve(__dirname, '..', 'lib', 'version.ts'), + `export const version = '${version}'; // x-release-please-version\n`, +);