Update main.yml

This commit is contained in:
Wait
2020-08-21 12:39:33 +08:00
committed by GitHub
parent 51ad58445e
commit 0ba9b25b38

View File

@@ -25,17 +25,27 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Set build version - name: Test number_perser.get_number
run: |
python number_parser.py -v
- name: Set VERSION variable
run: | run: |
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
echo "::set-env name=VERSION::$version" echo "::set-env name=VERSION::$version"
- name: Set CLOUDSCRAPER_PATH variable
run: |
cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1)
echo "::set-env name=CLOUDSCRAPER_PATH::$cloudscraper_path"
- name: Build with PyInstaller - name: Build with PyInstaller
run: | run: |
pyinstaller \ pyinstaller \
--onefile AV_Data_Capture.py \ --onefile AV_Data_Capture.py \
--hidden-import ADC_function.py \ --hidden-import ADC_function.py \
--hidden-import core.py --hidden-import core.py \
--add-data "$CLOUDSCRAPER_PATH:cloudscraper"
- name: Copy config.ini - name: Copy config.ini
run: | run: |
@@ -63,17 +73,27 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Set build version - name: Test number_perser.get_number
run: |
python number_parser.py -v
- name: Set VERSION variable
run: | run: |
$env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') $env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
echo "::set-env name=VERSION::$env:version" echo "::set-env name=VERSION::$env:version"
- name: Set CLOUDSCRAPER_PATH variable
run: |
$env:cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1)
echo "::set-env name=CLOUDSCRAPER_PATH::$env:cloudscraper_path"
- name: Build with PyInstaller - name: Build with PyInstaller
run: | run: |
pyinstaller ` pyinstaller `
--onefile AV_Data_Capture.py ` --onefile AV_Data_Capture.py `
--hidden-import ADC_function.py ` --hidden-import ADC_function.py `
--hidden-import core.py --hidden-import core.py `
--add-data "$env:CLOUDSCRAPER_PATH;cloudscraper"
- name: Copy config.ini - name: Copy config.ini
run: | run: |
@@ -101,17 +121,27 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Set build version - name: Test number_perser.get_number
run: |
python number_parser.py -v
- name: Set VERSION variable
run: | run: |
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
echo "::set-env name=VERSION::$version" echo "::set-env name=VERSION::$version"
- name: Set CLOUDSCRAPER_PATH variable
run: |
cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1)
echo "::set-env name=CLOUDSCRAPER_PATH::$cloudscraper_path"
- name: Build with PyInstaller - name: Build with PyInstaller
run: | run: |
pyinstaller \ pyinstaller \
--onefile AV_Data_Capture.py \ --onefile AV_Data_Capture.py \
--hidden-import ADC_function.py \ --hidden-import ADC_function.py \
--hidden-import core.py --hidden-import core.py \
--add-data "$CLOUDSCRAPER_PATH:cloudscraper"
- name: Copy config.ini - name: Copy config.ini
run: | run: |