Skip to content

Commit 14dec07

Browse files
authored
chore: automate release scripts (#367)
* chore: automate release scripts * yarnrc * update test order * combine unit tests and type test * release script no longer needed
1 parent 86a5c16 commit 14dec07

File tree

5 files changed

+1305
-75
lines changed

5 files changed

+1305
-75
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,12 @@ jobs:
2323
node-version: ${{ matrix.node-version }}
2424
- name: Install
2525
run: yarn install --frozen-lockfile
26-
- name: Build
27-
run: yarn build
28-
env:
29-
CI: true
3026
- name: Typing Declartion Tests
3127
run: yarn test-dts
3228
env:
3329
CI: true
3430
- name: Unit Tests
35-
run: yarn test
31+
run: yarn test-unit
3632
env:
3733
CI: true
3834

.yarnrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version-tag-prefix "v"
2+
version-git-message "chore: release v%s"
3+
version-git-tag true

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@
2828
"start": "cross-env TARGET=es rollup -c -w",
2929
"build": "rimraf dist typings && tsc --emitDeclarationOnly && rollup -c",
3030
"lint": "prettier --write --parser typescript \"{src,test,test-dts}/*.ts?(x)\" && prettier --write \"{src,test}/*.js\"",
31-
"test": "cross-env NODE_ENV=test jest",
32-
"test-dts": "tsc -p ./test-dts/tsconfig.json && npm run build && tsc -p ./test-dts/tsconfig.build.json",
33-
"release": "bash scripts/release.sh"
31+
"test": "yarn test-dts && yarn test-unit",
32+
"test-unit": "cross-env NODE_ENV=test jest",
33+
"test-dts": "tsc -p ./test-dts/tsconfig.json && yarn build && tsc -p ./test-dts/tsconfig.build.json",
34+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
35+
"prepublish": "yarn test",
36+
"postpublish": "yarn release-gh",
37+
"version": "yarn changelog && git add CHANGELOG.md",
38+
"release": "yarn version && yarn publish",
39+
"release-gh": "conventional-github-releaser -p angular"
3440
},
3541
"bugs": {
3642
"url": "https://github.com/vuejs/composition-api/issues"
@@ -41,6 +47,8 @@
4147
"@rollup/plugin-replace": "^2.3.2",
4248
"@types/jest": "^25.2.3",
4349
"@types/node": "^14.0.6",
50+
"conventional-changelog-cli": "^2.0.31",
51+
"conventional-github-releaser": "^3.1.3",
4452
"cross-env": "^7.0.2",
4553
"husky": "^4.2.5",
4654
"jest": "^26.0.1",

scripts/release.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)