-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathcircle.yml
49 lines (46 loc) · 1.38 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
43
44
45
46
47
48
49
version: 2
jobs:
build:
docker:
- image: circleci/node:8.14.0
steps:
- run: sudo apt-get update
- run: sudo apt-get install libudev-dev
- run: sudo apt-get install libusb-1.0-0-dev
- checkout
- run: npm install
- run: npm run build
- persist_to_workspace:
root: ../
paths:
- project
deploy:
docker:
- image: circleci/node:8
steps:
- attach_workspace:
at: ../
- run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
- run: npm --no-git-tag-version version prerelease --preid=next.$(echo $CIRCLE_SHA1 | cut -c -7)
- run: npm publish --tag next || true
- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: git config --global user.name thegecko
- run: git config --global user.email [email protected]
- run: git add --force dist types docs
- run: git stash save
- run: git checkout gh-pages
- run: git merge master --no-commit -X theirs
- run: git checkout stash -- .
- run: git commit --allow-empty --message "Automatic Deployment [skip ci]"
- run: git push
workflows:
version: 2
commit:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master