-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
52 lines (50 loc) · 1.43 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
language: python
notifications:
email: false
jobs:
include:
- os: linux
dist: bionic
python: 3.8
before_install:
- pip3 install --upgrade pip
env:
- FOLDER=transcriber_${TRAVIS_TAG}_${TRAVIS_OS_NAME}
- ARCHIVE_NAME=${FOLDER}.tar.gz
install: &common_install
- pip3 install -r requirements.txt
before_script:
- python3 -m unittest discover
script: &common_script
- sed -i "s/{TRAVIS_TAG}/${TRAVIS_TAG}/g" run.py
- pyinstaller --name="transcriber" --windowed --onedir run.py
- mv dist/transcriber ${FOLDER}
before_deploy:
- tar -czf ${ARCHIVE_NAME} ${FOLDER}
deploy: &common_deploy
provider: releases
api_key: ${GITHUB_TOKEN}
file: ${ARCHIVE_NAME}
skip_cleanup: true
name: ${TRAVIS_TAG}
on:
tags: true
- os: windows
language: shell
before_install:
- choco install python --version=3.8
- python -m pip install --upgrade pip
env:
- PATH=/c/Python38:/c/Python38/Scripts:$PATH
- FOLDER=transcriber_${TRAVIS_TAG}_${TRAVIS_OS_NAME}
- ARCHIVE_NAME=${FOLDER}.zip
install:
- *common_install
before_script:
- python -m unittest discover
script:
- *common_script
before_deploy:
- 7z.exe a -tzip ${ARCHIVE_NAME} ${FOLDER}
deploy:
<<: *common_deploy