Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automated release setup. #250

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Changelog
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removed because all future additions to the changelog are pushed onto the beginning.


## v1.0.0-beta.2 (2019-11-15)

#### :rocket: Enhancement
Expand Down
67 changes: 67 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Release

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).


## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.


## Release

Once the prep work is completed, the actual release is straight forward:

* First ensure that you have `release-it` installed globally, generally done by
using one of the following commands:

```
# using https://volta.sh
volta install release-it

# using Yarn
yarn global add release-it

# using npm
npm install --global release-it
```

* Second, ensure that you have installed your projects dependencies:

```
yarn install
```

* And last (but not least 😁) do your release. It requires a
[GitHub personal access token](https://github.com/settings/tokens) as
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
or other scopes are required.

```
export GITHUB_AUTH="f941e0..."
release-it
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
9 changes: 0 additions & 9 deletions lerna.json

This file was deleted.

80 changes: 54 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,44 @@
"name": "glimmer.js",
"version": "1.0.0",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/glimmerjs/glimmer.js.git"
},
"license": "MIT",
"main": "dist/index.js",
"workspaces": [
"packages/@glimmer/*",
"packages/babel-plugins/@glimmer/*"
],
"scripts": {
"build": "bin/build.js",
"start": "webpack-dev-server",
"clean": "bin/clean.js",
"changelog": "lerna-changelog",
"lint": "eslint . --cache --ext .js,.ts",
"problems": "tsc -p tsconfig.json --noEmit",
"start": "webpack-dev-server",
"test": "yarn lint && testem ci && yarn test:babel-plugins",
"test:babel-plugins": "mocha -r esm --timeout 5000 test/babel-plugins.js",
"test:types": "dtslint test/types",
"test:ember": "yarn workspace @glimmer/component ember try:one",
"test:watch": "testem",
"problems": "tsc -p tsconfig.json --noEmit",
"lint": "eslint . --cache --ext .js,.ts"
"test:types": "dtslint test/types",
"test:watch": "testem"
},
"browserslist": {
"production": [
"last 2 Edge versions",
"last 2 Chrome versions",
"last 2 Firefox versions",
"last 2 Safari versions"
],
"development": [
"last 1 Chrome version",
"last 1 Firefox version",
"last 1 Safari version"
]
},
"resolutions": {
"amd-name-resolver": "https://github.com/ember-cli/amd-name-resolver.git"
},
"workspaces": [
"packages/@glimmer/*",
"packages/babel-plugins/@glimmer/*"
],
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.5.5",
Expand All @@ -37,11 +56,13 @@
"eslint-plugin-prettier": "^3.1.2",
"fs-extra": "^8.1.0",
"glob": "^7.0.5",
"lerna": "^3.15.0",
"lerna-changelog": "^0.7.0",
"mkdirp": "^0.5.1",
"prettier": "^1.19.1",
"qunit": "^2.9.2",
"release-it": "^13.5.0",
"release-it-lerna-changelog": "^2.1.2",
"release-it-yarn-workspaces": "^1.1.0",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"testem": "^2.16.0",
Expand All @@ -53,21 +74,8 @@
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.1"
},
"resolutions": {
"amd-name-resolver": "https://github.com/ember-cli/amd-name-resolver.git"
},
"browserslist": {
"production": [
"last 2 Edge versions",
"last 2 Chrome versions",
"last 2 Firefox versions",
"last 2 Safari versions"
],
"development": [
"last 1 Chrome version",
"last 1 Firefox version",
"last 1 Safari version"
]
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"changelog": {
"repo": "glimmerjs/glimmer.js",
Expand All @@ -79,5 +87,25 @@
"internal": ":house: Internal",
"deprecation": ":warning: Deprecation"
}
},
"release-it": {
"hooks": {
"after:bump": "node bin/build.js"
},
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
},
"release-it-yarn-workspaces": true
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
},
"npm": false
}
}
Loading