This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
88 lines (79 loc) · 2.11 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
language: node_js
node_js:
- 12.7.0
jobs:
include:
- os: linux
sudo: false
dist: trusty
- os: osx
osx_image: xcode7.3
addons:
chrome: stable
apt:
packages:
- jq
- fakeroot
- rpm
- libsecret-1-dev
homebrew:
packages:
- jq
cache:
directories:
- "$HOME/.cache/yarn"
- "$HOME/.cache/electron"
- "$HOME/Library/Caches/Yarn"
- "$HOME/Library/Caches/electron"
env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
- FORCE_COLOR=1
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn install --non-interactive
script:
- yarn lint
- yarn test
before_deploy:
- yarn cross-env NODE_ENV=production ember electron:build -e production --output-path electron-out/ember
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
security create-keychain -p "$CSC_KEY_PASSWORD" codesign.keychain;
security set-keychain-settings -l -u -t 3600 codesign.keychain;
security unlock-keychain -p "$CSC_KEY_PASSWORD" codesign.keychain;
security default-keychain -s codesign.keychain;
export CSC_FILE="$(mktemp -u).p12";
echo "$CSC_LINK" | base64 -D > $CSC_FILE;
security import "$CSC_FILE" -k codesign.keychain -P "$CSC_KEY_PASSWORD" -T "$(which codesign)";
rm -f "$CSC_FILE";
security find-identity -v -p codesigning;
fi
- yarn cross-env NODE_ENV=production ember electron:make -e production --build-path electron-out/ember
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
security delete-keychain codesign.keychain;
fi
- export GITHUB_RELEASE="$(cat package.json | jq -r '.productName') $(echo $TRAVIS_TAG | cut -c 2-)"
deploy:
provider: releases
api_key: $GITHUB_TOKEN
name: $GITHUB_RELEASE
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
skip_cleanup: true
overwrite: true
draft: true
prerelease: true
file_glob: true
file:
- "electron-out/make/*.zip"
- "electron-out/make/*.dmg"
- "electron-out/make/*/*.rpm"
- "electron-out/make/*/*.deb"
on:
tags: true