-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.yml
63 lines (56 loc) · 1.69 KB
/
demo.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
61
62
63
if: branch =~ ^main$|^development|^release
language: node_js
node_js: 12
group: stable
dist: trusty
os: linux
before_script: |
git config user.email "snile657@outlook.com"
git config user.name "crycime"
before_install: npm install -g yarn@^1.10.0
install: yarn install --frozen-lockfile
cache:
yarn: true
directories:
- node_modules
jobs:
include:
- stage: test
language: node_js
script:
- yarn test
- stage: publish
name: 'bump version to beta and publish'
language: node_js
script: |
set -e
chmod +x scripts/npm-publish.js
yarn bumpVersion:release
git add .
git push --verbose --no-verify --follow-tags --quiet "https://${GITHUG_TOKEN}@github.com/crycime/sam_cli.git" HEAD:${TRAVIS_BRANCH}
deploy:
provider: npm
email: snile657@outlook.com
api_key: "$NPM_TOKEN"
tag: beta
skip_cleanup: true
on:
all_branches: true
if: (branch =~ /^(release*)/) AND type != pull_request AND !(commit_message =~ /(\[skip release-ci\])/)
- stage: publish
name: 'bump version to stable production and publish'
language: node_js
script: |
set -e
chmod +x scripts/npm-publish.js
yarn bumpVersion:main
git add .
git push --verbose --no-verify --follow-tags --quiet "https://${GITHUG_TOKEN}@github.com/crycime/sam_cli.git" HEAD:${TRAVIS_BRANCH}
deploy:
provider: npm
email: snile657@outlook.com
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
all_branches: true
if: (branch =~ /^(main*)/) AND type != pull_request AND !(commit_message =~ /(\[skip main-ci\])/)