Skip to content

Commit 69582c2

Browse files
authored
chore: trigger releases from main changesets (#141)
* chore: trigger releases from main changesets * chore: skip release workflow on version bump commits * docs: keep existing release details
1 parent 20bc43a commit 69582c2

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@
1717
### If releasing new changes
1818

1919
- [ ] Ran `pnpm changeset` to generate a changeset file
20-
- [ ] Added the `release` label to the PR
2120

2221
<!-- For more details check RELEASING.md -->

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
name: "Release"
22

33
on:
4-
pull_request:
5-
types: [closed]
4+
push:
65
branches: [main]
6+
paths:
7+
- '.changeset/*.md'
78
workflow_dispatch:
89

910
permissions:
1011
contents: read
1112

1213
# Concurrency control: only one release process can run at a time
13-
# This prevents race conditions if multiple PRs with 'release' label merge simultaneously
14+
# This prevents race conditions if multiple releasable changesets merge simultaneously
1415
concurrency:
1516
group: release
1617
cancel-in-progress: false
@@ -19,11 +20,6 @@ jobs:
1920
check-changesets:
2021
name: Check for changesets
2122
runs-on: ubuntu-latest
22-
if: |
23-
github.event_name == 'workflow_dispatch' ||
24-
(github.event_name == 'pull_request' &&
25-
github.event.pull_request.merged == true &&
26-
contains(github.event.pull_request.labels.*.name, 'release'))
2723
outputs:
2824
has-changesets: ${{ steps.check.outputs.has-changesets }}
2925
steps:
@@ -137,7 +133,7 @@ jobs:
137133
id: commit-version-bump
138134
uses: planetscale/ghcommit-action@25309d8005ac7c3bcd61d3fe19b69e0fe47dbdde # v0.2.20
139135
with:
140-
commit_message: "chore: release ${{ steps.apply-changesets.outputs.new-version }} [version bump]"
136+
commit_message: "chore: release ${{ steps.apply-changesets.outputs.new-version }} [version bump] [skip ci]"
141137
repo: ${{ github.repository }}
142138
branch: main
143139
env:

RELEASING.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ The changeset file will be created in the `.changeset/` directory.
2424

2525
Create a PR with your code changes and the changeset file.
2626

27-
### 3. Add the `release` label
27+
### 3. Merge the PR
2828

29-
When the PR is ready to be released, add the `release` label.
30-
31-
### 4. Merge the PR
32-
33-
When a PR with the `release` label is merged to `main`, the release workflow will automatically:
29+
No release label is required. When the PR is merged to `main`, the release workflow will automatically:
3430

3531
1. Check for pending changesets
3632
2. Notify the Client Libraries team in Slack for approval

0 commit comments

Comments
 (0)