Skip to content

Commit 807bed7

Browse files
chore: add changesets (#41)
1 parent 708baab commit 807bed7

File tree

5 files changed

+971
-15
lines changed

5 files changed

+971
-15
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/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "react-hook-form/devtools" }
6+
],
7+
"commit": false,
8+
"linked": [],
9+
"access": "public",
10+
"baseBranch": "master",
11+
"ignore": []
12+
}

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
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+
with:
15+
fetch-depth: 0
16+
17+
- name: Use Node.js 12.x
18+
uses: actions/setup-node@v1
19+
with:
20+
version: 12.x
21+
22+
- name: Install Dependencies
23+
run: yarn --frozen-lockfile
24+
25+
- name: Create Release Pull Request or Publish to npm
26+
uses: changesets/action@master
27+
with:
28+
publish: yarn release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"test": "jest --runInBand",
2828
"test:watch": "npm run test -- --watchAll --coverage",
2929
"postversion": "git push && git push origin v$npm_package_version",
30-
"prepublishOnly": "npm run lint && npm run lint:types && npm test && npm run build"
30+
"prepublishOnly": "npm run lint && npm run lint:types && npm test && npm run build",
31+
"changeset": "changeset",
32+
"release": "changeset publish"
3133
},
3234
"keywords": [
3335
"react",
@@ -61,6 +63,8 @@
6163
"react-simple-animate": "^3.3.8"
6264
},
6365
"devDependencies": {
66+
"@changesets/changelog-github": "^0.2.6",
67+
"@changesets/cli": "^2.9.2",
6468
"@rollup/plugin-commonjs": "^13.0.0",
6569
"@rollup/plugin-json": "^4.1.0",
6670
"@rollup/plugin-node-resolve": "^8.1.0",

0 commit comments

Comments
 (0)