Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Automate releases with changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel K committed Oct 12, 2020
1 parent 3d54391 commit c34d8a9
Show file tree
Hide file tree
Showing 12 changed files with 730 additions and 115 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 5 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"changelog": ["@changesets/changelog-github", { "repo": "mobxjs/mobx-react" }],
"commit": false,
"access": "public"
}
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ about: Please open the PR instead!
labels: documentation
---

Documentation lives mostly in the `README.md` file. Please, send in PR directly with a change instead of describing what you want to change.
Basic API documentation lives in the `README.md` file. Please, send in PR directly with a change instead of describing what you want to change.

There is also https://mobx-react.js.org/ with more up to date information (no class components, though).

Ask here only if your change is bigger and there is a chance for rejecting it.
More up to date information can be found at https://mobx.js.org/react-integration.html site so feel free to contribute there.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question-discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ labels: question

We are open to your questions or discussion, but keep in mind it might take a while for us to respond. For a faster response, you can try the following channels.

- MobX Spectrum community: https://spectrum.chat/mobx
- GitHub discussions: https://github.com/mobxjs/mobx/discussions
- StackOverflow (`mobx` tag): https://stackoverflow.com/questions/tagged/mobx
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
### Code change checklist

- [ ] Added/updated unit tests
- [ ] Updated changelog
- [ ] Updated `README` if applicable

<!--
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 12.x
uses: actions/setup-node@master
with:
node-version: 12.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
commit: Version release
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package.json
package.json
*.yml
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

### 6.3.0

- Updated mobx-react-lite to 2.2.0 which removes the need to manually configure batching. Fixes [#859](https://github.com/mobxjs/mobx-react/issues/859)
- Updated mobx-react-lite to 2.2.0 which removes the need to manually configure batching. Fixes [#859](https://github.com/mobxjs/mobx-react/issues/859)

### 6.2.4

- Fix error thrown in the already defined observer class component warning message when attempting to get the components display name. [#887](https://github.com/mobxjs/mobx-react/issues/887)
- Fix error thrown in the already defined observer class component warning message when attempting to get the components display name. [#887](https://github.com/mobxjs/mobx-react/issues/887)

### 6.2.3

- Log warning if class component is already an observer to prevent memory leaks. [#839](https://github.com/mobxjs/mobx-react/issues/839)
- Fix disposeOnUnmount when using react-hot-loader. [#725](https://github.com/mobxjs/mobx-react/issues/725)
- Log warning if class component is already an observer to prevent memory leaks. [#839](https://github.com/mobxjs/mobx-react/issues/839)
- Fix disposeOnUnmount when using react-hot-loader. [#725](https://github.com/mobxjs/mobx-react/issues/725)

### 6.2.2

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# mobx-react

[![CircleCI](https://circleci.com/gh/mobxjs/mobx-react.svg?style=svg)](https://circleci.com/gh/mobxjs/mobx-react)
[![Join the chat at https://gitter.im/mobxjs/mobx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![CDNJS](https://img.shields.io/cdnjs/v/mobx-react.svg)](https://cdnjs.com/libraries/mobx-react)
[![Minzipped size](https://img.shields.io/bundlephobia/minzip/mobx-react-lite.svg)](https://bundlephobia.com/result?p=mobx-react-lite)

[![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/mobx-react)

Package with React component wrapper for combining React with MobX.
Exports the `observer` decorator and other utilities.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test:coverage": "jest -i --coverage",
"test:size": "size-limit",
"prettier": "prettier --write \"**/*.js\" \"**/*.ts\" \"**/*.tsx\"",
"release": "node publish.js",
"release": "yarn build && yarn changeset publish",
"build": "tsdx build --name mobxReact --format cjs,esm,umd",
"postbuild": "yarn v6compat",
"v6compat": "shx cp dist/mobxreact.umd.production.min.js dist/mobx-react.umd.js"
Expand All @@ -51,6 +51,8 @@
"@babel/plugin-proposal-decorators": "^7.1.0",
"@babel/plugin-transform-react-jsx": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@changesets/changelog-github": "^0.2.7",
"@changesets/cli": "^2.11.0",
"@testing-library/jest-dom": "^5.1.1",
"@testing-library/react": "^9.4.0",
"@types/create-react-class": "^15.6.0",
Expand Down
87 changes: 0 additions & 87 deletions publish.js

This file was deleted.

Loading

0 comments on commit c34d8a9

Please sign in to comment.