Skip to content

Commit 6aa6ad0

Browse files
authored
chore: re-setup changeset (#96)
1 parent 75b8d16 commit 6aa6ad0

File tree

4 files changed

+800
-28
lines changed

4 files changed

+800
-28
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config@1.4.0/schema.json",
33
"changelog": [
44
"@changesets/changelog-github",
55
{ "repo": "react-hook-form/resolvers" }

.github/workflows/release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,29 @@ on:
77

88
jobs:
99
release:
10+
name: Release
1011
runs-on: ubuntu-latest
11-
1212
steps:
13-
- uses: actions/checkout@v2
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
1415
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1517
fetch-depth: 0
1618

17-
- name: Use Node.js 12.x
18-
uses: actions/setup-node@v1
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
1921
with:
20-
version: 12.x
22+
node-version: 12.x
2123

2224
- name: Install Dependencies
23-
run: npm i
25+
run: yarn --frozen-lockfile
2426

2527
- name: Create Release Pull Request or Publish to npm
28+
id: changesets
2629
uses: changesets/action@master
2730
with:
28-
publish: npm run release
31+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
32+
publish: yarn release
2933
env:
3034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3135
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"test": "jest --runInBand",
3333
"test:watch": "npm run test -- --watchAll --coverage",
3434
"postversion": "git push && git push origin v$npm_package_version",
35-
"prepublishOnly": "npm run lint && npm run lint:types && npm test && npm run build"
35+
"prepublishOnly": "npm run lint && npm run lint:types && npm test && npm run build",
36+
"release": "yarn build && changeset publish"
3637
},
3738
"keywords": [
3839
"scheme",
@@ -57,6 +58,8 @@
5758
},
5859
"homepage": "https://react-hook-form.com",
5960
"devDependencies": {
61+
"@changesets/changelog-github": "^0.2.7",
62+
"@changesets/cli": "^2.12.0",
6063
"@rollup/plugin-commonjs": "^17.0.0",
6164
"@rollup/plugin-node-resolve": "^11.0.1",
6265
"@types/jest": "^26.0.19",
@@ -81,9 +84,9 @@
8184
"rollup-plugin-typescript2": "^0.29.0",
8285
"superstruct": "^0.13.1",
8386
"ts-jest": "^26.4.4",
84-
"yup": "^0.32.8",
8587
"typescript": "^4.1.3",
8688
"vest": "^2.2.3",
89+
"yup": "^0.32.8",
8790
"zod": "^1.11.11"
8891
},
8992
"peerDependencies": {

0 commit comments

Comments
 (0)