-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
61 lines (60 loc) · 3.3 KB
/
.travis.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
language: node_js
node_js:
- stable
cache:
yarn: true
directories:
- node_modules
notifications:
email: false
env:
global:
# GitHub API access token
secure: AbvA2fTH2rAP9xQ/u+gNXvffcWEQYX3l0tpLXc7Gfezffvynhqn8uX4nvvqpMSR+MaRgWtJSayAk95DLEbIwaugfTqWQ89/tWWq3q/t5Ov34kX3x9TTlooKb0Tf4Z9o7qealxkww2PXZhCV+LXisEc6NMmwYqpxV0K2mb2qjh22RkmqQ0D4/jcXCEvMmbI08ECGMu7BW+X4RRWDNCYWhKT8FeZSvkrUHCRe6ocilVwfhhm7dS5jVkGAwIu6XvIYRJ2V1nk8cvagFjF4vy8+5C9aSaug2Q1c3fldCQnU8zmmrXTjHZcPOfo/0OvpK7saohhQGiQILELMnDSIe4+gLpTkOS0q5iBm5fbFKBOCHcg7Wf5u9+6oeUuE7Eik0JRAWe44FtJ3Lix+71w5pikFH4RtFwn80UFitY1h9df8kkYeeoKEhdaiK141LRBI0nVFEiZSH3O/ZRgTqKS5WBB/F6sdoELgfUi39VZRSoE2Yar0q1XDEHDSLd/lOyt2mgLbbwOd7W1a4WX+9CND9JIF9e4C9xX1BGgxlst17V2wTRE4OfSOwVKFQ6wYde0UcM3jIbE7K6I1Qwv1mepwZ9oEUI0UgXLT3z1Rsa/MsAk+vT19v0M/lEjRbJALoSk9uR+5nPE8NZA/1os6HnCAM02x7pbHkPUOQvPYrFqvsT9m+MZE=
before_install:
# Add ssh key w/ write permission for `as24-custom-events` repo
- openssl aes-256-cbc -K $encrypted_ab46abe2afd1_key -iv $encrypted_ab46abe2afd1_iv -in travis_ci_rsa.enc -out ./travis_ci_rsa -d
- chmod 600 travis_ci_rsa
- eval `ssh-agent -s`
- ssh-add travis_ci_rsa
install:
- yarn install
- yarn global add codecov
script:
- yarn run test
- yarn run build
after_success:
- codecov
- |
# Check if we need to do SEMVER bump based on commit's parent PR labels
# - only run for master branch we don't want to release PRs and other branches
# - only run on non-tagged releases, this will bump the version, tag, commit & push back to github
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
SEMVER_BUMP=$(./semver_from_pr_labels.sh $TRAVIS_COMMIT 2>/dev/null)
if [[ ! -z "$SEMVER_BUMP" ]]; then
echo "Bumping package version for $SEMVER_BUMP release and pushing tag to github"
git checkout master # switch to master branch (which is the same as the current commit), so we are not in DETACHED mode
yarn version --new-version $SEMVER_BUMP
git remote set-url origin [email protected]:Scout24/as24-custom-events.git # use ssh instead of https
git push origin master --follow-tags
else
echo "No sematic version release label found on PR, tagging skipped."
fi
fi
deploy:
- provider: npm
email: '#[email protected]'
skip_cleanup: true
api_key:
secure: EQAjDRVU2diHI1/qFkpP5OCbEsfVZ958yAliF7t9STjQaTgpKy5N+r0LHRjeZ39JlnpKv0MD3mR2fkFtmc4Sk/u4tlTDG9c8CaeRnk2FVdbwXGjaJ4Y5c+bITn1y+FIOigQ+Ikl1OTPh9W1FYdWcCNnQ5sUoSOoIrx9zDjZG9kJtMXDd6zZ8vXJkOwjC6OZs03MDtQpSndOlpmpgSKv58q2sknkkbpSiHvPZ11GDLSp5CeggcR8uWvuLAM3/wt03/ChnrPzwmMpDlZvr7JaEOcJACZZf0GAcNAIk/TKrU4auoR+cVG/KBLm/dXqdzGGy63yneYFF89umG6Eneh+CKR6USMulxqTrQysKzdcxYin7PoMOiYcHU5gQNSPt+Wj6z/K+G4yx0ggr1irKxR5/ulRY4ltambcfkL1NE+7RpFs4PVcs288JezkECuW90b1MKvusjuhSEu3sJsmr0AB16kg9bQfRkiaDfLBzB/EHszHsrXl2c7NqPmn/5nDwUhPvGy6wbwBatQTNM8zdaLNaIsJUFrrBT8dsi2DxVR3aE4N9WUvRGzUj1VriwKkKFxRFk6g0MwcPvNlJkSO9a7Yrtr3rihoY39/k39cq8mh80iosZAVjj5Wxro358I8h+rHkoHwDA3bgkMrfblo784IWtDOkENoNhPCMGA5DHVmSR08=
on:
tags: true
repo: Scout24/as24-custom-events
branch: master
- provider: script
script: './gh-release.sh'
skip_cleanup: true
on:
tags: true
repo: Scout24/as24-custom-events
branch: master