Skip to content

Commit 3d64e2b

Browse files
JReinholdCopilot
andcommitted
Migrate release tooling to changesets
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 145f3b4 commit 3d64e2b

File tree

10 files changed

+1184
-1581
lines changed

10 files changed

+1184
-1581
lines changed

.changeset/brisk-otters-dance.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@storybook/addon-webpack5-compiler-swc': patch
3+
---
4+
5+
Add provenance to npm releases.

.changeset/config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "storybookjs/addon-webpack5-compiler-swc" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch"
10+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish preview
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
CI: true
11+
COREPACK_INTEGRITY_KEYS: 0
12+
13+
jobs:
14+
release-preview:
15+
name: Publish preview releases
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
20+
- name: Enable corepack (for pnpm)
21+
run: corepack enable
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
25+
with:
26+
cache: pnpm
27+
node-version-file: '.nvmrc'
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Build
33+
run: pnpm build
34+
35+
- name: Publish preview releases
36+
run: pnpm pkg-pr-new publish --pnpm

.github/workflows/publish.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
CI: true
10+
COREPACK_INTEGRITY_KEYS: 0
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
id-token: write
16+
17+
jobs:
18+
release:
19+
name: Release
20+
runs-on: ubuntu-latest
21+
if: github.repository == 'storybookjs/addon-webpack5-compiler-swc'
22+
steps:
23+
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
24+
id: app-token
25+
with:
26+
app-id: ${{ vars.STORYBOOK_BOT_APP_ID }}
27+
private-key: ${{ secrets.STORYBOOK_BOT_APP_PRIVATE_KEY }}
28+
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Enable corepack (for pnpm)
34+
run: corepack enable
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
38+
with:
39+
cache: pnpm
40+
node-version-file: '.nvmrc'
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
45+
- name: Create Release Pull Request or Publish to npm
46+
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
47+
with:
48+
publish: pnpm release
49+
commitMode: github-api
50+
env:
51+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

AGENTS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Release Process
2+
3+
This repo uses [Changesets](https://github.com/changesets/changesets) for versioning and publishing.
4+
5+
```bash
6+
pnpm changeset # Create a changeset for your changes
7+
pnpm release # Build and publish (CI handles this automatically)
8+
```
9+
10+
Before committing, run the repo checks:
11+
12+
```bash
13+
pnpm format
14+
pnpm check:ci
15+
```
16+
17+
## Creating Changesets
18+
19+
When making user-facing changes, create a changeset file in `.changeset/`.
20+
21+
1. Use the filename convention `<random-word>-<random-word>-<random-word>.md`
22+
2. Format the file like this:
23+
24+
```markdown
25+
---
26+
'@storybook/addon-webpack5-compiler-swc': patch
27+
---
28+
29+
Short description of what changed.
30+
```
31+
32+
Use `patch` for fixes and maintenance, `minor` for backward-compatible features, and `major` for breaking changes.

CHANGELOG.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# v4.0.3 (Wed Mar 25 2026)
1+
# @storybook/addon-webpack5-compiler-swc
2+
3+
## v4.0.3 (Wed Mar 25 2026)
24

35
#### 🐛 Bug Fix
46

@@ -10,7 +12,7 @@
1012

1113
---
1214

13-
# v4.0.2 (Mon Nov 10 2025)
15+
## v4.0.2 (Mon Nov 10 2025)
1416

1517
#### 🐛 Bug Fix
1618

@@ -22,7 +24,7 @@
2224

2325
---
2426

25-
# v4.0.1 (Wed Sep 03 2025)
27+
## v4.0.1 (Wed Sep 03 2025)
2628

2729
#### 🐛 Bug Fix
2830

@@ -34,7 +36,7 @@
3436

3537
---
3638

37-
# v4.0.0 (Tue Sep 02 2025)
39+
## v4.0.0 (Tue Sep 02 2025)
3840

3941
#### 💥 Breaking Change
4042

@@ -46,7 +48,7 @@
4648

4749
---
4850

49-
# v3.0.0 (Fri Mar 14 2025)
51+
## v3.0.0 (Fri Mar 14 2025)
5052

5153
#### 💥 Breaking Change
5254

@@ -58,7 +60,7 @@
5860

5961
---
6062

61-
# v2.1.0 (Wed Feb 12 2025)
63+
## v2.1.0 (Wed Feb 12 2025)
6264

6365
#### 🚀 Enhancement
6466

@@ -75,7 +77,7 @@
7577

7678
---
7779

78-
# v2.0.0 (Mon Dec 30 2024)
80+
## v2.0.0 (Mon Dec 30 2024)
7981

8082
#### 💥 Breaking Change
8183

@@ -87,7 +89,7 @@
8789

8890
---
8991

90-
# v1.0.6 (Mon Dec 30 2024)
92+
## v1.0.6 (Mon Dec 30 2024)
9193

9294
#### 🐛 Bug Fix
9395

@@ -99,7 +101,7 @@
99101

100102
---
101103

102-
# v1.0.5 (Mon Jul 29 2024)
104+
## v1.0.5 (Mon Jul 29 2024)
103105

104106
#### 🐛 Bug Fix
105107

@@ -111,7 +113,7 @@
111113

112114
---
113115

114-
# v1.0.4 (Thu Jun 20 2024)
116+
## v1.0.4 (Thu Jun 20 2024)
115117

116118
#### 🐛 Bug Fix
117119

@@ -123,7 +125,7 @@
123125

124126
---
125127

126-
# v1.0.3 (Wed May 29 2024)
128+
## v1.0.3 (Wed May 29 2024)
127129

128130
#### 🐛 Bug Fix
129131

@@ -136,7 +138,7 @@
136138

137139
---
138140

139-
# v1.0.2 (Mon Mar 11 2024)
141+
## v1.0.2 (Mon Mar 11 2024)
140142

141143
#### 🐛 Bug Fix
142144

@@ -149,7 +151,7 @@
149151

150152
---
151153

152-
# v1.0.1 (Tue Feb 27 2024)
154+
## v1.0.1 (Tue Feb 27 2024)
153155

154156
#### 🐛 Bug Fix
155157

@@ -161,7 +163,7 @@
161163

162164
---
163165

164-
# v1.0.0 (Thu Jan 04 2024)
166+
## v1.0.0 (Thu Jan 04 2024)
165167

166168
#### 💥 Breaking Change
167169

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
},
1515
"scripts": {
1616
"build": "tsup",
17+
"changeset": "changeset",
1718
"format": "biome format ./src",
1819
"format:write": "pnpm format --write",
1920
"check": "biome check ./src",
2021
"check:apply": "pnpm check --apply",
2122
"check:apply-unsafe": "pnpm check --apply-unsafe",
2223
"check:ci": "biome ci ./src",
23-
"release": "auto shipit"
24+
"release": "pnpm build && pnpm changeset publish"
2425
},
2526
"exports": {
2627
".": {
@@ -60,7 +61,9 @@
6061
},
6162
"devDependencies": {
6263
"@biomejs/biome": "^1.9.4",
63-
"auto": "^11.3.0",
64+
"@changesets/changelog-github": "^0.5.1",
65+
"@changesets/cli": "^2.29.6",
66+
"pkg-pr-new": "^0.0.57",
6467
"storybook": "^9.1.3",
6568
"tsup": "^8.5.0",
6669
"typescript": "^5.9.2",
@@ -73,11 +76,6 @@
7376
"node": ">=18"
7477
},
7578
"author": "Storybook Bot <storybookbot@gmail.com>",
76-
"auto": {
77-
"plugins": [
78-
"npm"
79-
]
80-
},
8179
"bundler": {
8280
"exportEntries": [
8381
"src/index.ts"

0 commit comments

Comments
 (0)