Skip to content

Commit 23ff3e9

Browse files
committed
chore: enable automatic CHANGELOG generation via Changesets
Switch from manual CHANGELOG management to @changesets/changelog-github. - Update .changeset/config.json to use @changesets/changelog-github - Pass GITHUB_TOKEN to changeset version step in release workflow (@changesets/changelog-github needs it to fetch PR metadata for links) - Fix git add to include CHANGELOG.md (pre-existing bug — changeset version modifies CHANGELOG.md but it was never staged in the commit step) - Fix stale v3.0.6 '(Unreleased)' label — published to npm August 25, 2025
1 parent a65405e commit 23ff3e9

3 files changed

Lines changed: 70 additions & 2 deletions

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3-
"changelog": false,
3+
"changelog": ["@changesets/changelog-github", { "repo": "Shopify/buy-button-js" }],
44
"commit": false,
55
"fixed": [],
66
"linked": [],

.github/workflows/npm-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
- name: Update package version and remove changesets
5252
if: env.changesets_found == 'true'
5353
run: pnpm exec changeset version
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5456

5557
- name: Publish to NPM
5658
if: env.changesets_found == 'true'
@@ -69,6 +71,6 @@ jobs:
6971
run: |
7072
git config --global user.name 'github-actions[bot]'
7173
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
72-
git add package.json .changeset
74+
git add package.json .changeset CHANGELOG.md
7375
git commit -m "Update package version & delete changesets"
7476
git push

pnpm-lock.yaml

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)