1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-12-23 01:29:49 +01:00

add release process

This commit is contained in:
Matthias Kretschmann 2020-04-27 16:54:53 +02:00
parent f168f20213
commit 4d64b7f41f
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 2487 additions and 3 deletions

View File

@ -27,6 +27,8 @@
- [👩‍🔬 Testing](#-testing)
- [🛳 Production](#-production)
- [⬆️ Releases](#-releases)
- [Production](#production)
- [Pre-Releases](#pre-releases)
- [📜 Changelog](#-changelog)
- [🎁 Contribute](#-contribute)
- [🧜 Authors](#-authors)
@ -157,6 +159,43 @@ npm run build
## ⬆️ Releases
Releases are managed semi-automatically. They are always manually triggered from a developer's machine with release scripts.
### Production
From a clean `master` branch you can run any release task bumping the version accordingly based on semantic versioning:
- To bump a patch version: `npm run release`
- To bump a minor version: `npm run release -- minor`
- To bump a major version: `npm run release -- major`
Every task does the following:
- bumps the project version in `package.json`, `package-lock.json`
- auto-generates and updates the CHANGELOG.md file from commit messages
- creates a Git tag
- commits and pushes everything
- creates a GitHub release with commit messages as description
- Git tag push will trigger Travis to do a npm release
For the GitHub releases steps a GitHub personal access token, exported as `GITHUB_TOKEN` is required. [Setup](https://github.com/release-it/release-it#github-releases)
### Pre-Releases
Usually from a feature branch you can release a develop version under the `next` npm tag.
Say the current version is at `v1.1.0`, then to publish a pre-release for a next major version `v2.0.0-beta.0`, do:
```bash
npm run release -- major --preRelease=beta --npm.tag=next
# consecutive releases, e.g. to then get `v2.0.0-beta.1`
npm run release -- --preRelease
# final version, e.g. to then get `v2.0.0`
npm run release -- major
```
## 📜 Changelog
See the [CHANGELOG.md](./CHANGELOG.md) file.
@ -171,9 +210,9 @@ Created based on the work and learnings of the Ocean Protocol marketplace team:
- [@kremalicious](https://github.com/kremalicious)
- [@maxieprotocol](https://github.com/maxieprotocol)
- [@mihaisc](https://github.com/mihaisc)
- [@unjapones](https://github.com/unjapones)
- [@pfmescher](https://github.com/pfmescher)
- [@mihaisc](https://github.com/mihaisc)
## 🏛 License

2417
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,10 @@
"build": "tsc && tsc -m es6 --outDir dist/esm",
"test": "npm run lint",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write"
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
"release": "release-it --non-interactive",
"changelog": "auto-changelog -p",
"prepublishOnly": "npm run build"
},
"files": [
"LICENSE",
@ -22,15 +25,18 @@
"react": "^16.13.1"
},
"devDependencies": {
"@release-it/bumper": "^1.1.0",
"@types/react": "^16.9.34",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"auto-changelog": "^2.0.0",
"eslint": "^6.8.0",
"eslint-config-oceanprotocol": "^1.5.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"prettier": "^2.0.5",
"release-it": "^13.5.6",
"typescript": "^3.8.3"
},
"peerDependencies": {
@ -45,5 +51,27 @@
"bugs": {
"url": "https://github.com/oceanprotocol/react/issues"
},
"homepage": "https://github.com/oceanprotocol/react#readme"
"homepage": "https://github.com/oceanprotocol/react#readme",
"release-it": {
"hooks": {
"after:bump": "npm run changelog"
},
"plugins": {
"@release-it/bumper": {
"out": [
"package.json",
"package-lock.json"
]
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": false
}
}
}