-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
50 lines (43 loc) · 1.1 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: php
sudo: false
dist: trusty
env:
- PROJECT_NAME=irc-bot
jobs:
include:
- php: "5.6"
- php: "7.0"
- php: "7.1"
- php: "7.2"
- php: "nightly"
cache:
apt: true
directories:
- $HOME/.composer/cache
- vendor
script:
- composer install --no-dev -a
- composer archive --format=tar --file=$PROJECT_NAME
- tar tvf $PROJECT_NAME.tar
before_deploy:
- install -d $PROJECT_NAME-$TRAVIS_TAG
- tar -xf $PROJECT_NAME.tar -C $PROJECT_NAME-$TRAVIS_TAG
- tar cJf $PROJECT_NAME-$TRAVIS_TAG.tar.xz $PROJECT_NAME-$TRAVIS_TAG
deploy:
provider: releases
# https://docs.travis-ci.com/user/deployment/releases/
# Create token with privilege in https://github.com/settings/tokens and set as env var.
# It must have the public_repo or repo scope to upload assets
# $ travis env set -p GITHUB_API_TOKEN abcdefabcdefabcdef
# or via https://travis-ci.org/eventum/irc-bot/settings
api_key: $GITHUB_API_TOKEN
file_glob: true
file:
- $PROJECT_NAME-*.tar.xz
skip_cleanup: true
overwrite: true
on:
repo: eventum/irc-bot
php: '5.6'
tags: true
# vim:ts=2:sw=2:et