Skip to content

Commit f436991

Browse files
authored
Setup changesets (#37)
1 parent 9f22fc3 commit f436991

File tree

7 files changed

+501
-21
lines changed

7 files changed

+501
-21
lines changed

.changeset/README.md

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

.changeset/config.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{ "repo": "bluwy/whyframe" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"fixed": [],
10+
"linked": [],
11+
"baseBranch": "master",
12+
"updateInternalDependencies": "minor",
13+
"ignore": []
14+
}

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup node
3333
uses: actions/setup-node@v4
3434
with:
35-
node-version: 18
35+
node-version: 22
3636
cache: pnpm
3737
cache-dependency-path: '**/pnpm-lock.yaml'
3838

.github/workflows/release.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- '.changeset/**'
10+
- '.github/workflows/release.yml'
11+
- 'pnpm-lock.yaml'
12+
13+
jobs:
14+
release:
15+
# prevents this action from running on forks
16+
if: github.repository == 'bluwy/whyframe'
17+
name: Release
18+
permissions:
19+
pull-requests: write # to create pull request (changesets/action)
20+
contents: write # to create release (changesets/action)
21+
id-token: write # OpenID Connect token needed for provenance
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # fetch all history for changelog generation
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
32+
- name: Setup node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
cache: pnpm
37+
38+
- name: Install dependencies
39+
run: pnpm install
40+
41+
- name: Create release PR or publish to npm
42+
uses: changesets/action@v1
43+
with:
44+
commit: Release packages
45+
title: Release packages
46+
publish: pnpm changeset publish
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
NPM_CONFIG_PROVENANCE: true

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"astro": "^2.10.15",
3232
"rehype-autolink-headings": "^6.1.1",
3333
"rehype-slug": "^5.1.0",
34-
"shiki": "^0.14.7",
34+
"shiki": "0.14.3",
3535
"svelte": "^4.2.19",
3636
"vite-plugin-cloudflare-redirect": "^0.1.2",
3737
"vite-plugin-inspect": "^0.8.9"

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"format": "prettier \"**/*.{js,ts,jsx,css,md,vue,svelte,astro}\" --write --cache"
1414
},
1515
"devDependencies": {
16+
"@changesets/cli": "^2.27.12",
17+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
1618
"prettier": "^3.4.2",
1719
"prettier-plugin-astro": "^0.13.0",
1820
"prettier-plugin-svelte": "^3.3.3",
@@ -26,7 +28,8 @@
2628
"@whyframe/core": "workspace:*",
2729
"@whyframe/jsx": "workspace:*",
2830
"@whyframe/svelte": "workspace:*",
29-
"@whyframe/vue": "workspace:*"
31+
"@whyframe/vue": "workspace:*",
32+
"prettier": "$prettier"
3033
},
3134
"peerDependencyRules": {
3235
"ignoreMissing": [

0 commit comments

Comments
 (0)