Skip to content

Commit 7fdd593

Browse files
committed
changesets init
1 parent 01e11ef commit 7fdd593

4 files changed

Lines changed: 65 additions & 0 deletions

File tree

.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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"access": "restricted",
6+
"baseBranch": "master"
7+
}

.github/workflows/changesets.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Create Version PR from dev -> master
2+
3+
# run when dev branch changes (or keep workflow_dispatch for manual run)
4+
on:
5+
push:
6+
branches:
7+
- dev
8+
# optional: let you run it manually too
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write # required for commits
13+
pull-requests: write # required to create PRs
14+
15+
concurrency: ${{ github.workflow }}-${{ github.ref }}
16+
17+
jobs:
18+
create-version-pr:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout (full history)
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
with:
34+
version: 10
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Create release PR (Changesets)
40+
uses: changesets/action@v1
41+
with:
42+
# run the script that executes `changeset version --global-changelog`
43+
version: 'pnpm run version:changesets'
44+
title: 'release: version + CHANGELOG.md'
45+
# **important**: open the version PR onto master even though we run on dev
46+
# baseBranch: 'master'
47+
createGithubReleases: 'false'
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@
620620
}
621621
},
622622
"scripts": {
623+
"version:changesets": "changeset version --global-changelog",
623624
"vscode:prepublish": "pnpm build",
624625
"build": "pnpm types && node esbuild.mjs",
625626
"compile": "cross-env NODE_ENV=0 pnpm build",

0 commit comments

Comments
 (0)