diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 06bfa59..e0eca5e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,6 +17,5 @@ ### If releasing new changes - [ ] Ran `pnpm changeset` to generate a changeset file -- [ ] Added the `release` label to the PR diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 805998b..ce7f32b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,17 @@ name: "Release" on: - pull_request: - types: [closed] + push: branches: [main] + paths: + - '.changeset/*.md' workflow_dispatch: permissions: contents: read # Concurrency control: only one release process can run at a time -# This prevents race conditions if multiple PRs with 'release' label merge simultaneously +# This prevents race conditions if multiple releasable changesets merge simultaneously concurrency: group: release cancel-in-progress: false @@ -19,11 +20,6 @@ jobs: check-changesets: name: Check for changesets runs-on: ubuntu-latest - if: | - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && - github.event.pull_request.merged == true && - contains(github.event.pull_request.labels.*.name, 'release')) outputs: has-changesets: ${{ steps.check.outputs.has-changesets }} steps: @@ -137,7 +133,7 @@ jobs: id: commit-version-bump uses: planetscale/ghcommit-action@25309d8005ac7c3bcd61d3fe19b69e0fe47dbdde # v0.2.20 with: - commit_message: "chore: release ${{ steps.apply-changesets.outputs.new-version }} [version bump]" + commit_message: "chore: release ${{ steps.apply-changesets.outputs.new-version }} [version bump] [skip ci]" repo: ${{ github.repository }} branch: main env: diff --git a/RELEASING.md b/RELEASING.md index 8359f5b..fb59ba9 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -24,13 +24,9 @@ The changeset file will be created in the `.changeset/` directory. Create a PR with your code changes and the changeset file. -### 3. Add the `release` label +### 3. Merge the PR -When the PR is ready to be released, add the `release` label. - -### 4. Merge the PR - -When a PR with the `release` label is merged to `main`, the release workflow will automatically: +No release label is required. When the PR is merged to `main`, the release workflow will automatically: 1. Check for pending changesets 2. Notify the Client Libraries team in Slack for approval