Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
ci: use changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyshen committed Nov 6, 2020
1 parent c2d54e5 commit 981842c
Show file tree
Hide file tree
Showing 5 changed files with 674 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.4.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "wellyshen/react-cool-form" }
],
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -45,7 +45,8 @@
"clean:cov": "rimraf coverage",
"copy": "run-p copy:*",
"copy:cjs": "cpy rollup/cjsEntryFile.js dist --rename=index.js",
"copy:type": "cpy src/types/react-cool-form.d.ts dist --rename=index.d.ts"
"copy:type": "cpy src/types/react-cool-form.d.ts dist --rename=index.d.ts",
"release": "changeset publish"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -124,6 +125,7 @@
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@babel/preset-typescript": "^7.12.1",
"@changesets/cli": "^2.11.2",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
Expand Down

0 comments on commit 981842c

Please sign in to comment.