-
Notifications
You must be signed in to change notification settings - Fork 10
/
.drone.yml
58 lines (54 loc) · 1.55 KB
/
.drone.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
---
kind: pipeline
name: default
steps:
- name: Test apllication
image: node:12.13.1
commands:
- yarn install
- yarn lint
- yarn test || echo tests are not ok
- name: "Bump & Tag"
image: quay.io/openware/sdk-citools:2.3.1
environment:
BRANCH_NAME: ${DRONE_BRANCH}
REPO_NAME: ${DRONE_REPO}
GITHUB_API_KEY:
from_secret: kite_bot_key
commands:
- BUNDLE_GEMFILE=/sdk/Gemfile bundle exec rake --rakefile=/sdk/Rakefile ci:prebuild
- name: Republish package on npmjs
image: node:12.13.1
environment:
NPM_LOGIN:
from_secret: npmjs_login
NPM_PASS:
from_secret: npmjs_pass
NPMJS_TOKEN:
from_secret: npmjs_token
GITHUB_API_KEY:
from_secret: kite_bot_key
commands:
- git config --global user.name "kite-bot"
- git config --global user.email "[email protected]"
- git remote set-url origin https://kite-bot:[email protected]/${DRONE_REPO}
- git fetch origin
- echo "//registry.npmjs.org/:_authToken=$NPMJS_TOKEN" > .npmrc
- npm --no-git-tag-version version "$(cat VERSION)"
- npm publish | true
- git add package.json VERSION
- git commit --amend --no-edit
- git tag $(cat VERSION) | true
- git push -f origin ${DRONE_BRANCH}
- git push --tags origin | true
- git describe --tags $(git rev-list --tags --max-count=1) > .tags
when:
event:
- push
branch:
- master
trigger:
event:
- push
image_pull_secrets:
- dockerconfigjson