forked from refined-github/refined-github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (44 loc) · 1.41 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
language: node_js
node_js:
- 'node'
env:
- EXTENSION_ID=hlepfoohegkhhmjieoechaddaejaokhf
deploy:
- # Publishes tagged version. Expects tag to be valid version
provider: script
skip_cleanup: true
script: npm run release
on:
tags: true
- # Creates versioned git tag when build is triggered via "Trigger build" on Travis-ci.com
provider: script
skip_cleanup: true
script: npm run create-git-tag
on:
branch: master
condition: $TRAVIS_EVENT_TYPE = api
- # Creates versioned git tag on daily Travis cronjobs if HEAD isn't already tagged
provider: script
skip_cleanup: true
script: npm run create-git-tag
on:
branch: master
condition: ($TRAVIS_EVENT_TYPE = cron) && ($(git tag -l --points-at HEAD) = "")
# Setup Travis to be able to push git tags to GitHub
after_success:
- |
declare -r SSH_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
# Decrypt the file containing the private key
openssl aes-256-cbc \
-K $encrypted_132e22846a88_key \
-iv $encrypted_132e22846a88_iv \
-in ".travis/github_deploy_key.enc" \
-out "$SSH_FILE" -d
# Enable SSH authentication
chmod 600 "$SSH_FILE" \
&& printf "%s\n" \
"Host github.com" \
" IdentityFile $SSH_FILE" \
" LogLevel ERROR" >> ~/.ssh/config
# Set SSH remote
git remote set-url origin git@github.com:sindresorhus/refined-github.git