forked from NewFuture/DDNS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (41 loc) · 1.06 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
language: python
python:
- "2.7"
- "3.7"
dist: xenial
# os:
# - linux
# - osx
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PYINSTALLER='pyinstaller==3.6';else export PYINSTALLER=pyinstaller;fi
# command to install dependencies
install:
- pip install ${PYINSTALLER}
# command to run tests
script:
- sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${TRAVIS_BRANCH}/" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py
- cp /etc/ssl/certs/ca-certificates.crt cert.pem
- export SSL_CERT_FILE=${PWD}/cert.pem
- pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
- ./dist/ddns || test -e "config.json"
git:
depth: 2
deploy:
- provider: releases
api_key: "${GH_TOKEN}"
skip_cleanup: true
file:
- "dist/ddns"
on:
tags: true
branch: master
python: '3.7'
- provider: pypi
user: newfuture-bot
password: "${PYPI_PWD}"
skip_cleanup: true
distributions: "sdist bdist_wheel" # Your distributions here
on:
tags: true
branch: master
python: '3.7'