diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59b276b..58a7686 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,17 +25,27 @@ jobs: python -m pip install --upgrade pip 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: | version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__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 run: | pyinstaller \ --onefile AV_Data_Capture.py \ --hidden-import ADC_function.py \ - --hidden-import core.py + --hidden-import core.py \ + --add-data "$CLOUDSCRAPER_PATH:cloudscraper" - name: Copy config.ini run: | @@ -63,17 +73,27 @@ jobs: python -m pip install --upgrade pip 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: | $env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__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 run: | pyinstaller ` --onefile AV_Data_Capture.py ` --hidden-import ADC_function.py ` - --hidden-import core.py + --hidden-import core.py ` + --add-data "$env:CLOUDSCRAPER_PATH;cloudscraper" - name: Copy config.ini run: | @@ -101,17 +121,27 @@ jobs: python -m pip install --upgrade pip 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: | version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__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 run: | pyinstaller \ --onefile AV_Data_Capture.py \ --hidden-import ADC_function.py \ - --hidden-import core.py + --hidden-import core.py \ + --add-data "$CLOUDSCRAPER_PATH:cloudscraper" - name: Copy config.ini run: |