2019-05-17 06:28:37 +02:00
|
|
|
language: node_js
|
|
|
|
node_js: "12"
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
dist: trusty
|
|
|
|
osx_image: xcode8.3
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
- $HOME/.cache/electron
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- fakeroot
|
|
|
|
- rpm
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- /^v\d+\.\d+\.\d+/
|
|
|
|
|
|
|
|
install:
|
|
|
|
- npm install
|
2019-05-17 08:25:30 +02:00
|
|
|
- mkdir -p ./src/images
|
|
|
|
- cd ./src/images
|
|
|
|
- wget -O images.zip https://1drv.ws/u/s!AkfaAw_EaahOkulh8rA41x2phgfYXQ
|
|
|
|
- unzip -o images.zip
|
|
|
|
- rm images.zip
|
|
|
|
- rm -r __MACOSX
|
|
|
|
- cd ../..
|
2019-05-17 08:31:48 +02:00
|
|
|
- ls src
|
|
|
|
- ls src/images
|
2019-05-17 06:28:37 +02:00
|
|
|
- |
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then
|
|
|
|
export CERTIFICATE_P12=cert.p12;
|
|
|
|
echo $MACOS_CERT_P12 | base64 --decode > $CERTIFICATE_P12;
|
|
|
|
export KEYCHAIN=build.keychain;
|
|
|
|
# Create the keychain with a password
|
|
|
|
security create-keychain -p travis $KEYCHAIN;
|
|
|
|
# Make the custom keychain default, so xcodebuild will use it for signing
|
|
|
|
security default-keychain -s $KEYCHAIN;
|
|
|
|
# Unlock the keychain
|
|
|
|
security unlock-keychain -p travis $KEYCHAIN;
|
|
|
|
# Add certificates to keychain and allow codesign to access them
|
|
|
|
# Apple Worldwide Developer Relations Certification Authority
|
2019-05-23 19:18:57 +02:00
|
|
|
security import ./assets/certs/apple.cer -k ~/Library/Keychains/$KEYCHAIN -T /usr/bin/codesign
|
2019-05-17 06:28:37 +02:00
|
|
|
# Developer Authentication Certification Authority
|
2019-05-23 19:18:57 +02:00
|
|
|
security import ./assets/certs/dac.cer -k ~/Library/Keychains/$KEYCHAIN -T /usr/bin/codesign
|
2019-05-17 06:28:37 +02:00
|
|
|
# Developer ID Felix
|
|
|
|
security import $CERTIFICATE_P12 -k $KEYCHAIN -P $MACOS_CERT_PASSWORD -T /usr/bin/codesign 2>&1 >/dev/null;
|
|
|
|
rm $CERTIFICATE_P12;
|
|
|
|
security set-key-partition-list -S apple-tool:,apple: -s -k travis $KEYCHAIN
|
|
|
|
# Echo the identity
|
|
|
|
security find-identity -v -p codesigning
|
|
|
|
fi
|
|
|
|
script:
|
|
|
|
- npm run lint
|
|
|
|
- if test -z "$TRAVIS_TAG"; then npm run make; fi
|
|
|
|
|
|
|
|
after_success: if test -n "$TRAVIS_TAG"; then npm run publish; fi
|