Skip to content

Commit f06ec40

Browse files
committed
chore(release): use semantic-release
1 parent 7bc2839 commit f06ec40

File tree

3 files changed

+100
-1
lines changed

3 files changed

+100
-1
lines changed

.circleci/config.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: 2
2+
3+
aliases:
4+
- &restore-cache
5+
keys:
6+
- dependency-cache-{{ checksum "package.json" }}
7+
8+
- &save-cache
9+
key: dependency-cache-{{ checksum "package.json" }}
10+
paths:
11+
- node_modules
12+
13+
defaults: &defaults
14+
docker:
15+
- image: circleci/node:latest
16+
working_directory: /tmp/workspace
17+
18+
jobs:
19+
build:
20+
<<: *defaults
21+
steps:
22+
- checkout
23+
- restore_cache: *restore-cache
24+
- run: npm install
25+
- save_cache: *save-cache
26+
- run: npm run build
27+
- persist_to_workspace:
28+
root: /tmp/workspace
29+
paths:
30+
- "*"
31+
32+
deploy:
33+
<<: *defaults
34+
environment:
35+
GIT_AUTHOR_NAME: Ionitron
36+
GIT_AUTHOR_EMAIL: hi@ionicframework.com
37+
GIT_COMMITTER_NAME: Ionitron
38+
GIT_COMMITTER_EMAIL: hi@ionicframework.com
39+
steps:
40+
- add_ssh_keys:
41+
fingerprints:
42+
- "f4:36:b1:1d:f8:d6:55:51:22:dc:09:6f:b7:f2:45:47" # ionitron user key
43+
- checkout
44+
- attach_workspace:
45+
at: /tmp/workspace
46+
- run: npx semantic-release
47+
48+
49+
workflows:
50+
version: 2
51+
build:
52+
jobs:
53+
- build
54+
- deploy:
55+
requires: [build]
56+
filters:
57+
branches:
58+
only: stable

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# @ionic/angular-toolkit
22

3+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
4+
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&identifier=151767795)](https://dependabot.com)
5+
[![npm](https://img.shields.io/npm/v/@ionic/angular-toolkit.svg)](https://www.npmjs.com/package/@ionic/angular-toolkit)
6+
37
Angular Schematics and Builders for `@ionic/angular` apps.

package.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"lint": "tslint --config tslint.js --project tsconfig.json",
99
"build": "tsc",
1010
"watch": "tsc -w",
11-
"prepublishOnly": "npm run build"
11+
"prepublishOnly": "npm run build",
12+
"cz": "git-cz"
1213
},
1314
"repository": {
1415
"type": "git",
@@ -38,11 +39,18 @@
3839
"typescript": "3.0.1"
3940
},
4041
"devDependencies": {
42+
"@semantic-release/changelog": "^3.0.0",
43+
"@semantic-release/git": "^7.0.4",
44+
"@semantic-release/github": "^5.0.6",
45+
"@semantic-release/npm": "^5.0.4",
4146
"@types/node": "^8.10.34",
4247
"@types/webpack": "^4.4.14",
4348
"@types/webpack-dev-server": "^3.1.1",
49+
"commitizen": "^3.0.2",
50+
"cz-conventional-changelog": "^2.1.0",
4451
"lint-staged": "^7.2.0",
4552
"rimraf": "^2.6.2",
53+
"semantic-release": "^15.9.17",
4654
"tslint": "^5.9.1",
4755
"tslint-ionic-rules": "0.0.19"
4856
},
@@ -55,5 +63,34 @@
5563
"ignore": [
5664
"**/__tests__/*.{ts,tsx}"
5765
]
66+
},
67+
"release": {
68+
"branch": "stable",
69+
"verifyConditions": [
70+
"@semantic-release/changelog",
71+
"@semantic-release/npm",
72+
"@semantic-release/github",
73+
"@semantic-release/git"
74+
],
75+
"prepare": [
76+
"@semantic-release/changelog",
77+
"@semantic-release/npm",
78+
"@semantic-release/git"
79+
],
80+
"publish": [
81+
"@semantic-release/github",
82+
"@semantic-release/npm"
83+
],
84+
"success": [
85+
"@semantic-release/github"
86+
],
87+
"fail": [
88+
"@semantic-release/github"
89+
]
90+
},
91+
"config": {
92+
"commitizen": {
93+
"path": "./node_modules/cz-conventional-changelog"
94+
}
5895
}
5996
}

0 commit comments

Comments
 (0)