-
Notifications
You must be signed in to change notification settings - Fork 3
/
circle.yml
42 lines (39 loc) · 1.08 KB
/
circle.yml
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
version: 2.1
jobs:
build:
docker:
- image: circleci/node:10.2.1-stretch
steps:
- checkout
- run: yarn --frozen-lockfile --link-duplicates
- run: yarn --production --force --ignore-scripts --prefer-offline
- run: yarn autoclean --init
- run: echo *.ts >> .yarnclean
- run: echo *.ts.map >> .yarnclean
- run: echo *.spec.* >> .yarnclean
- run: yarn autoclean --force
- run: yarn cache clean
- run: rm -rf ./.git
- persist_to_workspace:
root: ../
paths:
- project
deploy:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ./
- run: tar cvzf package.tgz project
- run: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete -replace ${CIRCLE_BRANCH}.$(echo $CIRCLE_SHA1 | cut -c -7) ./package.tgz
workflows:
version: 2
commit:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master