Skip to content

Commit 0c708dd

Browse files
authored
Add Changesets configuration and CI workflow (#174)
- Introduced a new Changesets configuration file to manage versioning and changelog generation. - Added a GitHub Actions workflow for automating version publishing using Changesets. - Updated package.json to include a new CI publish script and added @changesets/cli as a dev dependency. - Enhanced pnpm-lock.yaml with new dependencies related to Changesets and updated existing ones.
1 parent ccb2502 commit 0c708dd

File tree

4 files changed

+551
-1
lines changed

4 files changed

+551
-1
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/changesets.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Changesets
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
CI: true
10+
11+
jobs:
12+
version:
13+
timeout-minutes: 15
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
22+
- name: Setup node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
run: pnpm install
30+
31+
- name: Create and publish versions
32+
uses: changesets/action@v1
33+
with:
34+
commit: "chore: update versions"
35+
title: "chore: update versions"
36+
publish: pnpm ci:publish
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
"build": "pnpm run build:lib && pnpm run build:blocks && pnpm run build:docs",
2020
"start": "pnpm --filter docs run start",
2121
"lint": "pnpm exec eslint .",
22-
"test": "pnpm -r run test"
22+
"test": "pnpm -r run test",
23+
"ci:publish": "pnpm publish -r"
2324
},
2425
"devDependencies": {
26+
"@changesets/cli": "^2.29.5",
2527
"@eslint/js": "9.29.0",
2628
"@testing-library/dom": "10.4.0",
2729
"@types/react": "19.1.8",

0 commit comments

Comments
 (0)