Skip to content

Commit 20d789a

Browse files
Merge pull request #345 from FormidableLabs/task/add-changesets
Add changesets to React Live
2 parents 92ff4f0 + c482842 commit 20d789a

File tree

4 files changed

+1168
-18
lines changed

4 files changed

+1168
-18
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/[email protected]/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,9 @@
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+
"changeset": "changeset",
25+
"version": "yarn changeset version"
2426
},
2527
"dependencies": {
2628
"prism-react-renderer": "^1.3.1",
@@ -35,6 +37,7 @@
3537
"@babel/plugin-transform-runtime": "^7.15.0",
3638
"@babel/preset-env": "^7.15.0",
3739
"@babel/preset-react": "^7.14.5",
40+
"@changesets/cli": "^2.26.1",
3841
"@rollup/plugin-babel": "^5.3.0",
3942
"@rollup/plugin-commonjs": "^20.0.0",
4043
"@rollup/plugin-node-resolve": "^13.0.4",
@@ -43,6 +46,7 @@
4346
"@storybook/builder-webpack5": "^6.5.16",
4447
"@storybook/manager-webpack5": "^6.5.16",
4548
"@storybook/react": "^6.4.13",
49+
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
4650
"@types/react": "^17.0.38",
4751
"babel-jest": "^27.0.6",
4852
"babel-loader": "^8.2.2",

0 commit comments

Comments
 (0)