Skip to content

Commit 206cf40

Browse files
committed
chore(package.json): prep for semantic-release
Automating deploys
1 parent e06d209 commit 206cf40

File tree

7 files changed

+3529
-93
lines changed

7 files changed

+3529
-93
lines changed

.github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v1
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
- name: Install dependencies
18+
run: yarn install
19+
- name: Build
20+
run: yarn build
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: yarn semantic-release

.releaserc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/npm",
6+
["@semantic-release/git", {
7+
"assets": ["package.json"],
8+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
9+
}],
10+
["@semantic-release/github", {
11+
"assets": [
12+
{"path": "pkg/dist-web/index.min.js", "label": "Minified Web Distribution"}
13+
]
14+
}]
15+
]
16+
}

CHANGELOG.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# Changelog
22

3-
## 1.3.0 - 2020-01-02
4-
5-
### Added
6-
7-
- Everything!
3+
[See Github releases](https://github.com/tdreyno/leisure/releases).

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Pretty Please
22

3+
[![Test Coverage](https://api.codeclimate.com/v1/badges/bade509a61c126d7f488/test_coverage)](https://codeclimate.com/github/tdreyno/pretty-please/test_coverage)
4+
[![npm latest version](https://img.shields.io/npm/v/@tdreyno/pretty-please/latest.svg)](https://www.npmjs.com/package/@tdreyno/pretty-please)
5+
36
Pretty Please is a TypeScript library provides Tasks an alternative to Promises.
47

58
Documentation of this project is a work in progress. For now, take a look at the example below and lean heavily on TypeScript's information around the public API.

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

package.json

+22-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
"version": "1.3.0",
44
"main": "build/index.js",
55
"typings": "build/index.d.ts",
6-
"repository": "git://github.com/tdreyno/pretty-please.git",
6+
"repository": "https://github.com/tdreyno/pretty-please.git",
7+
"publishConfig": {
8+
"access": "public"
9+
},
710
"scripts": {
811
"lint": "eslint -c .eslintrc.js --ext .ts src",
912
"build": "pika build && yarn compress",
1013
"compress": "terser pkg/dist-web/index.js -o pkg/dist-web/index.min.js --source-map --mangle --compress passes=2 --toplevel --mangle-props regex=/_$/ && gzip-size pkg/dist-web/index.min.js",
1114
"test": "jest --runInBand",
1215
"version": "yarn run build",
13-
"coverage": "jest --runInBand --coverage --coverageDirectory '../coverage'"
16+
"coverage": "jest --runInBand --coverage --coverageDirectory '../coverage'",
17+
"commit": "git-cz",
18+
"semantic-release": "semantic-release"
1419
},
1520
"@pika/pack": {
1621
"pipeline": [
@@ -41,6 +46,7 @@
4146
},
4247
"husky": {
4348
"hooks": {
49+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4450
"pre-commit": "lint-staged"
4551
}
4652
},
@@ -49,10 +55,16 @@
4955
"yarn": "1.21.1"
5056
},
5157
"devDependencies": {
58+
"@commitlint/cli": "^8.3.5",
59+
"@commitlint/config-conventional": "^8.3.4",
60+
"@commitlint/prompt": "^8.3.5",
5261
"@pika/pack": "^0.5.0",
5362
"@pika/plugin-build-node": "^0.8.1",
5463
"@pika/plugin-build-web": "^0.8.1",
5564
"@pika/plugin-ts-standard-pkg": "^0.8.1",
65+
"@semantic-release/github": "^7.0.3",
66+
"@semantic-release/changelog": "^5.0.0",
67+
"@semantic-release/git": "^9.0.0",
5668
"@types/jest": "^25.1.2",
5769
"@types/puppeteer": "^2.0.0",
5870
"@types/react": "^16.9.19",
@@ -67,13 +79,21 @@
6779
"ts-toolbelt": "^6.1.13",
6880
"@typescript-eslint/eslint-plugin": "^2.19.0",
6981
"@typescript-eslint/parser": "^2.19.0",
82+
"commitizen": "^4.0.3",
83+
"cz-conventional-changelog": "3.1.0",
7084
"eslint": "^6.8.0",
7185
"eslint-config-prettier": "^6.10.0",
7286
"eslint-plugin-prettier": "^3.1.2",
87+
"semantic-release": "^17.0.2",
7388
"typescript": "^3.7.5"
7489
},
7590
"dependencies": {},
7691
"peerDependencies": {
7792
"react": "^16.11.0"
93+
},
94+
"config": {
95+
"commitizen": {
96+
"path": "./node_modules/cz-conventional-changelog"
97+
}
7898
}
7999
}

0 commit comments

Comments
 (0)