From dae53fe1bbdfe58778d340f444c21a14e580c4c4 Mon Sep 17 00:00:00 2001 From: Dawei Date: Mon, 16 Jun 2025 12:10:48 -0700 Subject: [PATCH 1/2] Fix npm publish command in workflow --- .github/workflows/npmjs-publish.yml | 2 +- README.md | 36 ++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npmjs-publish.yml b/.github/workflows/npmjs-publish.yml index 7e34866d..23c6748d 100644 --- a/.github/workflows/npmjs-publish.yml +++ b/.github/workflows/npmjs-publish.yml @@ -41,4 +41,4 @@ jobs: run: | npm set "//registry.npmjs.org/:_authToken" "${{ secrets.NPMJS_AUTH_TOKEN }}" npm install --frozen-lockfile - npm run publish + npm run release diff --git a/README.md b/README.md index ed8829bb..dcd623a0 100644 --- a/README.md +++ b/README.md @@ -272,4 +272,38 @@ You can find more service examples in the [E2E test fixtures](https://github.com - `npm run check` -- lint - `npm run format` -- format - `npm run test` -- run tests -- `npm run publish` -- cut a new release (should bump version in package.json first) +- `npm run release` -- cut a new release (should bump version in package.json first) + +## Releasing + +River uses an automated release process with [Release Drafter](https://github.com/release-drafter/release-drafter) for version management and NPM publishing. + +### Automated Release Process (Recommended) + +1. **Label your PRs** with the appropriate version bump: + - `patch` - Bug fixes, small improvements (e.g., 0.208.4 → 0.208.5) + - `minor` - New features, backwards compatible (e.g., 0.208.4 → 0.209.0) + - `major` - Breaking changes (e.g., 0.208.4 → 1.0.0) + +2. **Merge PRs to main** - Release Drafter automatically: + - Creates/updates a draft release with the calculated version + - Generates release notes from PR titles + - Determines version bump based on the highest label used + +3. **Publish the release** when ready: + - Go to [GitHub Releases](../../releases) + - Review the draft release notes + - Click "Publish release" + - This automatically publishes to NPM + +### Manual Release (Alternative) + +For hotfixes or special cases, you can manually trigger a release: + +1. Go to [Actions](../../actions/workflows/npmjs-publish.yml) +2. Click "Run workflow" +3. Enter the desired version (e.g., `0.208.5`) +4. Click "Run workflow" + + + From fc2327796c5faac25aafda567eba10f0ad7925c3 Mon Sep 17 00:00:00 2001 From: Dawei Date: Mon, 16 Jun 2025 12:17:08 -0700 Subject: [PATCH 2/2] fix format --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcd623a0..c85f0aea 100644 --- a/README.md +++ b/README.md @@ -281,11 +281,13 @@ River uses an automated release process with [Release Drafter](https://github.co ### Automated Release Process (Recommended) 1. **Label your PRs** with the appropriate version bump: + - `patch` - Bug fixes, small improvements (e.g., 0.208.4 → 0.208.5) - `minor` - New features, backwards compatible (e.g., 0.208.4 → 0.209.0) - `major` - Breaking changes (e.g., 0.208.4 → 1.0.0) 2. **Merge PRs to main** - Release Drafter automatically: + - Creates/updates a draft release with the calculated version - Generates release notes from PR titles - Determines version bump based on the highest label used @@ -304,6 +306,3 @@ For hotfixes or special cases, you can manually trigger a release: 2. Click "Run workflow" 3. Enter the desired version (e.g., `0.208.5`) 4. Click "Run workflow" - - -