Skip to content

Commit 3636463

Browse files
authored
chore: setup changeset (#8)
1 parent ad56a47 commit 3636463

File tree

5 files changed

+597
-1
lines changed

5 files changed

+597
-1
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/config@3.0.4/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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js 20
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20.x
19+
- name: Install dependencies
20+
run: pnpm install
21+
- name: Create release pull request or publish to npm
22+
id: changesets
23+
uses: changesets/action@v1
24+
with:
25+
publish: pnpm release
26+
title: 'chore: release'
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@
4343
"lint": "eslint .",
4444
"lint:fix": "eslint . --fix",
4545
"format": "prettier . --check",
46-
"format:fix": "prettier . --write"
46+
"format:fix": "prettier . --write",
47+
"changeset": "changeset",
48+
"release": "pnpm build && changeset publish"
4749
},
4850
"dependencies": {
4951
"esm-env": "^1.1.4"
5052
},
5153
"devDependencies": {
54+
"@changesets/cli": "^2.27.10",
5255
"@eslint/js": "^9.15.0",
5356
"@sveltejs/package": "^2.3.7",
5457
"@types/node": "^22.10.1",

0 commit comments

Comments
 (0)