# Purchases UI JS

Web components for Paywalls. Powered by RevenueCat

## Building

To build your library:

```bash
npm run package
```

## Releasing

PR titles must follow [Conventional Commits](https://conventionalcommits.org/) (checked by the `PR title` workflow), since they become the squash-merge commit message.

[release-please](https://github.com/googleapis/release-please) keeps a release PR open that bumps the version and updates `CHANGELOG.md` from the merged commits. Merging it tags `vX.Y.Z` and the `Publish` workflow publishes to npm via [trusted publishing](https://docs.npmjs.com/trusted-publishers) (no npm token; the trust is bound to `.github/workflows/publish.yml`, so don't rename it).

`feat` releases a minor version; `fix`, `perf`, `revert`, `chore` and `docs` release a patch. `ci`, `build`, `refactor`, `test` and `style` do not trigger a release. A `!` after the type (e.g. `feat!:`) releases a major version.

The release PR is opened with `GITHUB_TOKEN`, so its checks don't start on their own; approve the workflow runs on the PR to get them going.

After publishing, the workflow triggers the `dependency-update` action in [purchases-js](https://github.com/RevenueCat/purchases-js), which opens a bump PR there if its pinned `@revenuecat/purchases-ui-js` is behind. It uses the `CIRCLE_TOKEN` repository secret, a CircleCI personal API token for RCGitBot.
