forked from yarnpkg/yarn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
60 lines (51 loc) · 1.37 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
50
51
52
53
54
55
56
57
58
59
60
general:
branches:
ignore:
- gh-pages
artifacts:
- "artifacts/"
machine:
node:
version: 6
dependencies:
cache_directories:
- "~/.yarn-cache"
- "~/ghr"
override:
- which node
# install dependencies
- ./scripts/bootstrap-env-ubuntu.sh
- yarn install
# setup ghr
- >
if [[ ! -e ~/ghr ]]; then
curl -L --create-dirs -o ~/ghr/ghr.zip https://github.com/tcnksm/ghr/releases/download/v0.5.0/ghr_v0.5.0_linux_amd64.zip;
unzip ~/ghr/ghr.zip -d ~/ghr
fi
- sudo ln -sF ~/ghr/ghr /usr/local/bin/ghr
test:
override:
- node -v
- >
if [ "$CIRCLE_BRANCH" == 'master' ]; then
./scripts/set-dev-version.js
fi;
- yarn lint
- yarn test-ci
- yarn check-lockfile
- yarn build-dist
- node ./scripts/build-webpack.js
- ./scripts/build-deb.sh
deployment:
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: yarnpkg
commands:
- ~/ghr/ghr --username yarnpkg --repository yarn --token $KPM_CIRCLE_RELEASE_TOKEN v$(dist/bin/yarn --version) artifacts/
- curl https://nightly.yarnpkg.com/sign_releases?token=$SIGN_TOKEN
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- ./scripts/set-installation-method.js "`pwd`/package.json" npm
- npm publish
notify:
webhooks:
- url: https://nightly.yarnpkg.com/api/archive_circleci