Skip to content

Commit a342147

Browse files
committed
chore(release): adjust semantic release
1 parent 7a01924 commit a342147

File tree

5 files changed

+36
-16
lines changed

5 files changed

+36
-16
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
dist/**

.releaserc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2+
"pkgRoot": "dist",
23
"plugins": [
34
"@semantic-release/commit-analyzer",
45
"@semantic-release/release-notes-generator",
56
"@semantic-release/changelog",
67
"@semantic-release/npm",
8+
["@semantic-release/exec", {
9+
"prepareCmd": "VERSION=${nextRelease.version} npm run bump-version"
10+
}],
711
["@semantic-release/git", {
812
"assets": ["package.json", "CHANGELOG.md"],
913
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
1014
}],
1115
"@semantic-release/github"
1216
]
13-
}
17+
}

.travis.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@ dist: trusty
22
sudo: required
33
language: node_js
44
node_js:
5-
- "8"
5+
- "8"
66

77
os:
8-
- linux
8+
- linux
99

1010
jobs:
1111
include:
12-
- stage: install
13-
script: npm install
14-
skip_cleanup: true
15-
- stage: test
16-
script: npm run report:coverage
17-
skip_cleanup: true
18-
- stage: release
19-
node_js: lts/*
20-
deploy:
21-
provider: script
12+
- stage: install
13+
script: npm install
2214
skip_cleanup: true
23-
script:
24-
- npx semantic-release
25-
if: branch = master
15+
- stage: test
16+
script: npm run report:coverage
17+
skip_cleanup: true
18+
- stage: build
19+
- npm run build
20+
- stage: release
21+
node_js: lts/*
22+
deploy:
23+
provider: script
24+
skip_cleanup: true
25+
script:
26+
- npx semantic-release
27+
if: branch = master

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"start:help": "ts-node bin/order.bin.ts -h",
3434
"start:example": "ts-node bin/order.bin.ts pizza beer",
3535
"test": "jest",
36+
"bump-version": "rjp package.json version $VERSION",
3637
"test:coverage": "jest --coverage",
3738
"report:coverage": "npm run test:coverage && codecov",
3839
"semantic-release": "semantic-release"
@@ -77,6 +78,7 @@
7778
"jest": "^23.6.0",
7879
"lint-staged": "^8.1.0",
7980
"prettier": "^1.15.3",
81+
"replace-json-property": "^1.4.1",
8082
"semantic-release": "^15.13.3",
8183
"ts-jest": "^24.0.2",
8284
"ts-node": "^8.3.0",

0 commit comments

Comments
 (0)