Skip to content

Commit ae6cc20

Browse files
committed
chore: add release it
1 parent 5627996 commit ae6cc20

File tree

8 files changed

+2106
-3
lines changed

8 files changed

+2106
-3
lines changed

.env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GITHUB_TOKEN=
2+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ testem.log
3939
Thumbs.db
4040

4141
.angular
42+
.env

.release-it.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"plugins": {
3+
"@release-it/conventional-changelog": {
4+
"preset": {
5+
"name": "conventionalcommits",
6+
"types": [
7+
{
8+
"type": "feat",
9+
"section": "Features"
10+
},
11+
{
12+
"type": "fix",
13+
"section": "Bug Fixes"
14+
},
15+
{
16+
"type": "cleanup",
17+
"section": "Cleanup"
18+
},
19+
{
20+
"type": "docs",
21+
"section": "Documentations"
22+
}
23+
]
24+
},
25+
"infile": "CHANGELOG.md"
26+
},
27+
"@release-it/bumper": {
28+
"in": "libs/angular-three-cannon/version.json",
29+
"out": ["libs/angular-three-cannon/version.json", "dist/libs/**/package.json"]
30+
}
31+
},
32+
"git": {
33+
"commitMessage": "chore: release ${version}"
34+
},
35+
"npm": {
36+
"publish": false
37+
},
38+
"github": {
39+
"release": true,
40+
"releaseName": "Release ${version}"
41+
},
42+
"hooks": {
43+
"before:bump": "npx nx package angular-three-cannon",
44+
"after:bump": ["git checkout -- package.json"]
45+
}
46+
}

libs/angular-three-cannon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-three-cannon",
3-
"version": "0.0.1",
3+
"version": "0.0.0-replace",
44
"peerDependencies": {
55
"@angular/common": "^15.1.0",
66
"@angular/core": "^15.1.0",

libs/angular-three-cannon/project.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
"libs/angular-three-cannon/debug/**/*.html"
5656
]
5757
}
58+
},
59+
"publish": {
60+
"executor": "nx:run-commands",
61+
"options": {
62+
"command": "npm publish",
63+
"cwd": "dist/libs/angular-three-cannon"
64+
}
5865
}
5966
},
6067
"tags": []
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "0.0.0"
3+
}

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "cannon",
33
"version": "0.0.0",
44
"license": "MIT",
5-
"scripts": {},
5+
"scripts": {
6+
"release": "dotenv release-it --"
7+
},
68
"private": true,
79
"devDependencies": {
810
"@angular-devkit/build-angular": "~15.1.0",
@@ -21,6 +23,8 @@
2123
"@nrwl/nx-cloud": "latest",
2224
"@nrwl/nx-plugin": "15.6.2",
2325
"@nrwl/workspace": "15.6.1",
26+
"@release-it/bumper": "4.0.2",
27+
"@release-it/conventional-changelog": "5.1.1",
2428
"@swc-node/register": "^1.4.2",
2529
"@swc/cli": "~0.1.55",
2630
"@swc/core": "^1.2.173",
@@ -29,6 +33,7 @@
2933
"@types/three": "^0.148.1",
3034
"@typescript-eslint/eslint-plugin": "^5.36.1",
3135
"@typescript-eslint/parser": "^5.36.1",
36+
"dotenv-cli": "7.0.0",
3237
"eslint": "~8.15.0",
3338
"eslint-config-prettier": "8.1.0",
3439
"jest": "28.1.1",
@@ -43,6 +48,7 @@
4348
"postcss-url": "~10.1.3",
4449
"prettier": "^2.8.3",
4550
"prettier-plugin-organize-imports": "^3.2.2",
51+
"release-it": "15.6.0",
4652
"ts-jest": "28.0.5",
4753
"ts-node": "10.9.1",
4854
"typescript": "~4.9.4"

0 commit comments

Comments
 (0)