-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
55 lines (55 loc) · 1.98 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
language: php
php:
- 7.1
- 7.2
sudo: required
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- dev
- "/\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
env:
- WP_VERSION=4.9.8 TRAVIS_NODE_VERSION="6"
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- node_modules
- vendor
before_install:
- sudo apt-get -qq update
- source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION
install:
- node -v
- npm install -g yarn
- yarn
- composer install
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]] && php -v | grep -q 'Xdebug'; then phpenv
config-rm xdebug.ini; fi
script:
- yarn run build:production
- vendor/bin/phpcs --standard=phpcs.ruleset.xml .
before_deploy:
- export TRAVIS_PROJECT_SLUG="$(basename $TRAVIS_BUILD_DIR)"
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
- chmod +x wp-cli.phar
- sudo mv wp-cli.phar /usr/local/bin/wp
- wp package install wp-cli/dist-archive-command
- composer install --no-dev --optimize-autoloader
- cd ../
- wp dist-archive $TRAVIS_PROJECT_SLUG $TRAVIS_BUILD_DIR/$TRAVIS_PROJECT_SLUG-$TRAVIS_TAG.zip
- cd $TRAVIS_BUILD_DIR
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: K52IO18wtJkIaVZuAFNL6/ziZZIXA+9dXULfit5etQE4mEkk/0Hq52ip+b492Up+wXLqeRRw6QtvIAnu/fhf+B/4y0GXBKIwLXg8Sgl/VHRrp4rF4AiBJB4DCaBOM6PA50PYP5/MW95+6uMyNyznRW22wmCW12l8W1L3uocDKj23XfTfaCOh016wk9PKeHCRfCVMujY7Bx9/Wwr006UT+XdrdkY28wt1GjHJZBRzCONes87JglNrRBUVREm5YRxHT8nitBaVcAVV+CfqFbmOrGAqpQOTmW5J7xs1LvuPIPtpUmsxzxzDiLr9+VmIPdEf/N+tkBd1CdeHW3bCds8fqLW6IfdMaYprJg/0zecrVTcWI1PI3rkTzW/Uty4Mx+6ejiEslzjejaV5uWcnCbz7rJSd8O5KbTmXrtJ7zNv3QcA6r2uCxckWK34bdldQ0vztXUgNM5m5hg7eSQcxJoOzovHTOy8MBF7OVHTUX6nq2qY9p7JabNCp0mHyagPsuqVZ312mQizyoS6vABbYlpFXpMdm4CGTeO4beDYkXQTaSoVhJIh13/IigPkf6cy21QWpe2hVdqyDzEsYYjik0saKhUVGJfPLoj/93UPEvwPsafd/KVvUvxCa2+0uZ3fkgMbhuU5V+6y2iCmxe2gr09JyQqzFHJQ8HM1xg7HYUvjihKg=
file: eypd-$TRAVIS_TAG.zip
on:
tags: true
repo: BCcampus/eypd
branch: dev