Skip to content

Commit 621d367

Browse files
committed
Add changesets to React Live
1 parent 92ff4f0 commit 621d367

File tree

4 files changed

+1136
-12
lines changed

4 files changed

+1136
-12
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/config@2.3.0/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{
6+
"repo": "FormidableLabs/react-live"
7+
}
8+
],
9+
"access": "public",
10+
"baseBranch": "master"
11+
}

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: react-live Release Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
cache: "yarn"
18+
19+
- name: Install dependencies
20+
run: yarn install --frozen-lockfile
21+
22+
- name: Build packages
23+
run: yarn run build
24+
25+
- name: PR or Publish
26+
id: changesets
27+
uses: changesets/action@v1
28+
with:
29+
version: yarn run version
30+
publish: yarn changeset publish
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"install:docs": "yarn --cwd website install",
2121
"start:docs": "yarn --cwd website start",
2222
"build:docs": "yarn --cwd website build",
23-
"format:docs": "prettier --write docs"
23+
"format:docs": "prettier --write docs",
24+
"prepare": "yarn build",
25+
"changeset": "changeset",
26+
"version": "yarn changeset version && yarn install --frozen-lockfile"
2427
},
2528
"dependencies": {
2629
"prism-react-renderer": "^1.3.1",
@@ -35,6 +38,7 @@
3538
"@babel/plugin-transform-runtime": "^7.15.0",
3639
"@babel/preset-env": "^7.15.0",
3740
"@babel/preset-react": "^7.14.5",
41+
"@changesets/cli": "^2.26.1",
3842
"@rollup/plugin-babel": "^5.3.0",
3943
"@rollup/plugin-commonjs": "^20.0.0",
4044
"@rollup/plugin-node-resolve": "^13.0.4",

0 commit comments

Comments
 (0)