forked from voyagegroup/ingred-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.mk
52 lines (43 loc) · 1.03 KB
/
ci.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: install test lint changelog release_note release_version publish
RELEASE_VERSION ?=
GITHUB_TOKEN ?=
NPM_TOKEN ?=
OUTPUT_FILE ?= release_note.md
install:
ifeq ($(CI), true)
yarn install --frozen-lockfile
else
yarn install
endif
build:
yarn build
test:
yarn test
lint:
yarn lint
changelog:
github_changelog_generator \
--user voyagegroup \
--project ingred-ui \
--exclude-labels release \
--future-release v${RELEASE_VERSION} \
--token ${GITHUB_TOKEN}
release_note:
github_changelog_generator \
--user voyagegroup \
--project ingred-ui \
--exclude-labels release \
--future-release v${RELEASE_VERSION} \
--since-tag $(shell git describe --abbrev=0 --tags) \
--output ${OUTPUT_FILE} \
--token ${GITHUB_TOKEN}
release_version:
npm config set git-tag-version false
npm version ${RELEASE_VERSION}
publish: build
ifeq ($(CI), true)
git config --global user.email ingred-ui@voyagegroup.com
git config --global user.name INGRED-UI
endif
@echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
npm publish