diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c54747f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +This repository uses [Changesets](https://github.com/changesets/changesets) for release notes and versioning. + +Package changelogs are maintained automatically during `pnpm version-packages` and by the release workflow in [`./.github/workflows/release.yml`](./.github/workflows/release.yml). + +- [`@react-protected/core`](./packages/core/CHANGELOG.md) +- [`@react-protected/react`](./packages/react/CHANGELOG.md) +- [`@react-protected/react-router`](./packages/react-router/CHANGELOG.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2dade18..796680c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,6 +45,14 @@ pnpm changeset Commit the generated file from `.changeset/` with your PR. +When maintainers run: + +```bash +pnpm version-packages +``` + +Changesets bumps package versions and updates the package changelogs in `packages/*/CHANGELOG.md`. The same command is executed by the release workflow on `main`. + ## Pull Requests - Keep PRs focused and easy to review. diff --git a/README.md b/README.md index a49eb04..2d78af4 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,16 @@ If you want to contribute: - run `pnpm changeset` when your PR changes a published package - run `pnpm lint`, `pnpm typecheck` and `pnpm test` before submitting changes +## Changelog And Releases + +Releases are managed with Changesets. + +- add a changeset with `pnpm changeset` whenever a PR changes a published package +- `pnpm version-packages` generates or updates `packages/*/CHANGELOG.md` and bumps package versions +- pushing to `main` triggers [`.github/workflows/release.yml`](./.github/workflows/release.yml), which opens the release PR and publishes to npm + +The repository-level overview lives in [CHANGELOG.md](./CHANGELOG.md). + See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full workflow. ## License diff --git a/packages/core/package.json b/packages/core/package.json index 805abdf..aaf2919 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -22,7 +22,8 @@ } }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "build": "vite build", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index aea869b..9e09f9c 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -27,7 +27,8 @@ } }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "build": "vite build", diff --git a/packages/react/package.json b/packages/react/package.json index af44ff6..d49acad 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -27,7 +27,8 @@ } }, "files": [ - "dist" + "dist", + "CHANGELOG.md" ], "scripts": { "build": "vite build",