Skip to content

Commit 4679549

Browse files
committed
chore: setup changesets
1 parent 6b15eb0 commit 4679549

File tree

5 files changed

+609
-10
lines changed

5 files changed

+609
-10
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.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": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
permissions: {}
8+
9+
jobs:
10+
release:
11+
permissions:
12+
contents: write # to create release (changesets/action)
13+
id-token: write # OpenID Connect token needed for provenance
14+
pull-requests: write # to create pull request (changesets/action)
15+
# prevents this action from running on forks
16+
if: github.repository == 'sveltejs/vite-plugin-svelte'
17+
name: Release
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
# pseudo-matrix for convenience, NEVER use more than a single combination
22+
node: [24]
23+
os: [ubuntu-latest]
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v5
27+
with:
28+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
29+
fetch-depth: 0
30+
- uses: actions/setup-node@v5
31+
with:
32+
node-version: ${{ matrix.node }}
33+
package-manager-cache: false # pnpm is not installed yet
34+
- name: install pnpm
35+
shell: bash
36+
run: |
37+
PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json)
38+
echo installing pnpm version $PNPM_VER
39+
npm i -g pnpm@$PNPM_VER
40+
- uses: actions/setup-node@v5
41+
with:
42+
node-version: ${{ matrix.node }}
43+
package-manager-cache: true # caches pnpm via packageManager field in package.json
44+
- name: install
45+
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts
46+
- name: publint
47+
run: pnpm check:publint
48+
49+
- name: Create Release Pull Request or Publish to npm
50+
id: changesets
51+
# pinned for security, always review third party action code before updating
52+
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
53+
with:
54+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
55+
publish: pnpm release
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NPM_CONFIG_PROVENANCE: true

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"test:unit": "vitest",
1313
"test": "npm run test:unit -- --run",
1414
"test:watch": "npm run test:unit -- --watch",
15-
"inspect": "pnpm mcp-inspector"
15+
"inspect": "pnpm mcp-inspector",
16+
"release": "pnpm run --filter ./packages/mcp-stdio/ build && changeset publish"
1617
},
1718
"keywords": [
1819
"svelte",
@@ -22,6 +23,7 @@
2223
],
2324
"private": true,
2425
"devDependencies": {
26+
"@changesets/cli": "^2.29.7",
2527
"@eslint/compat": "^1.3.2",
2628
"@eslint/js": "^9.36.0",
2729
"@modelcontextprotocol/inspector": "^0.16.7",
@@ -32,6 +34,7 @@
3234
"globals": "^16.0.0",
3335
"prettier": "^3.4.2",
3436
"prettier-plugin-svelte": "^3.3.3",
37+
"publint": "^0.3.13",
3538
"typescript": "^5.0.0",
3639
"typescript-eslint": "^8.44.1",
3740
"vitest": "^3.2.3"

0 commit comments

Comments
 (0)