Skip to content

Commit 3bd52c0

Browse files
committed
feat: Version via CI, not before pushing
1 parent a028f2c commit 3bd52c0

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

.circleci/config.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ jobs: # a collection of steps
3535
- store_artifacts:
3636
path: ~/tmp/reports/eslint
3737

38+
version: # version the project
39+
executor: node-project
40+
steps:
41+
- checkout
42+
- restore_cache:
43+
key: dependency-cache-{{ checksum "package-lock.json" }}
44+
- run:
45+
name: Add Git User details
46+
command: |
47+
git config --global user.email "ripixel+ci@gmail.com"
48+
git config --global user.name "CircleCi"
49+
- run:
50+
name: Standard version
51+
command: npm run release:ci
52+
3853
build: # build the project - requires dependencies to have been installed
3954
executor: node-project
4055
steps:
@@ -75,13 +90,21 @@ workflows:
7590
- lint:
7691
requires:
7792
- install_deps
93+
- version:
94+
filters:
95+
branches:
96+
only: master
97+
requires:
98+
- lint
7899
- build:
100+
filters:
101+
branches:
102+
only: master
79103
requires:
80-
- install_deps
104+
- version
81105
- deploy_to_firebase:
82106
filters:
83107
branches:
84108
only: master
85109
requires:
86110
- build
87-
- lint

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"build:thoughts": "mkdir -p ./public/thoughts && ts-node ./scripts/generateThoughts",
1717
"lint": "eslint \"scripts/**/*{.js,.ts}\"",
1818
"lint:ci": "eslint \"scripts/**/*{.js,.ts}\" --format junit -o reports/eslint/results.xml",
19-
"release": "npm run lint && standard-version",
20-
"rp": "npm run release && git push --follow-tags origin master --no-verify"
19+
"release": "standard-version",
20+
"release:ci": "npm run release && git push --follow-tags origin master --no-verify"
2121
},
2222
"repository": {
2323
"type": "git",

0 commit comments

Comments
 (0)