Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit ca890ae

Browse files
authored
chore(build): automate build process (#33)
TL;DR: `npm run release` creates new releases. incorporate release-it (https://www.npmjs.com/package/release-it) to manage our builds, github tagging and github releases. **creating a build** Run `npm run release`: this will kick-off the `release.sh` script. It expects a `GITHUB_TOKEN` located at a local `.env` file. Then, it runs `npm install` and `npm run test`. If they succeed, then it proceeds to create a new build by running `npm run build`. Lastly, you will see an interactive CLI interface, where you can select `patch`, `minor` or `major` among the options. The result is a new git tag with the corresponding version, and a new Github release.
1 parent 3854106 commit ca890ae

File tree

6 files changed

+1736
-8
lines changed

6 files changed

+1736
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
node_modules
44

5+
# file with envinronment variables
6+
.env
7+
58
# demo/test scenes
69
demos/
710
test-scene/

.release-it.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"hooks": {
3+
"before:init": ["npm install", "npm run test"],
4+
"after:bump": "npm run build",
5+
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
6+
},
7+
"git": {
8+
"changelog": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
9+
"requireCleanWorkingDir": true,
10+
"requireUpstream": true,
11+
"requireCommits": false,
12+
"addUntrackedFiles": false,
13+
"commit": true,
14+
"commitMessage": "Release ${version}",
15+
"commitArgs": "",
16+
"tag": true,
17+
"tagName": "${version}",
18+
"tagAnnotation": "Release ${version}",
19+
"tagArgs": "",
20+
"push": true,
21+
"pushArgs": "--follow-tags",
22+
"pushRepo": "origin"
23+
},
24+
"npm": {
25+
"publish": false,
26+
"publishPath": ".",
27+
"access": null,
28+
"otp": null
29+
},
30+
"github": {
31+
"release": true,
32+
"releaseName": "Release v${version}",
33+
"releaseNotes": null,
34+
"preRelease": false,
35+
"draft": false,
36+
"tokenRef": "GITHUB_TOKEN",
37+
"assets": null,
38+
"host": null,
39+
"timeout": 0,
40+
"proxy": null
41+
},
42+
"gitlab": {
43+
"release": false,
44+
"releaseName": "Release ${version}",
45+
"releaseNotes": null,
46+
"tokenRef": "GITLAB_TOKEN",
47+
"assets": null,
48+
"origin": null
49+
}
50+
}

0 commit comments

Comments
 (0)