forked from CzBiX/qb-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (32 loc) · 835 Bytes
/
.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
language: node_js
node_js: lts/*
branches:
except: /^nightly-.*$/
before_install:
- export TZ=Asia/Shanghai COMMIT_ID=${TRAVIS_COMMIT::6}
script:
- npm run lint
- npm run test:unit
- npm run build; [ -d dist/public ]
before_deploy:
# Add tag if missing
- if [ -z "$TRAVIS_TAG" ]; then
export TRAVIS_TAG=nightly-$COMMIT_ID RELEASE_TITLE=$(date +'%Y%m%d')-$COMMIT_ID &&
git tag $TRAVIS_TAG &&
echo tagged as $TRAVIS_TAG;
fi
# Pack for release
# see https://github.com/qbittorrent/qBittorrent/pull/10485, fixed in qb v4.2.0
- cp dist/public/{index,login}.html
- cp INSTALL.md dist
- zip -r dist.zip dist
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: dist.zip
skip_cleanup: true
overwrite: true
prerelease: true
name: $RELEASE_TITLE
on:
branch: master