From 5e17e6b25147fc2ca5b1c871770e5af9b5275a54 Mon Sep 17 00:00:00 2001 From: Yoshiko2 <42309414+yoshiko2@users.noreply.github.com> Date: Fri, 21 Aug 2020 03:20:10 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 103 ++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ffe26d..8460faa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,53 @@ on: - master jobs: + Linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Test number_perser.get_number + run: | + python number_parser.py -v + + - name: Set CLOUDSCRAPER_PATH variable + run: | + echo "::set-env name=CLOUDSCRAPER_PATH::$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1)" + + - id : VERSION + run: | + echo "::set-output name=VERSION::$(cat AV_Data_Capture.py | grep "version = " | tr -d "version = '")" + + - name: Build with pyinstaller + run: | + pyinstaller \ + --onefile AV_Data_Capture.py \ + --hidden-import ADC_function.py \ + --hidden-import core.py \ + --add-data "$CLOUDSCRAPER_PATH:cloudscraper" + + - name: Copy config.ini + run: | + cp config.ini dist/ + + - name: Upload build artifact + uses: actions/upload-artifact@v1 + with: + name: AV_Data_Capture-CLI-${{ Linux.VERSION.VERION }}-Linux + path: dist + + Windows: runs-on: windows-latest @@ -52,10 +99,8 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v1 - env: - VERSION: ${{ VERSION }} with: - name: AV_Data_Capture-CLI-${{ env.VERSION }}-Windows + name: AV_Data_Capture-CLI-${{ Linux.VERSION.VERION }}-Windows path: dist @@ -101,56 +146,6 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v1 - env: - VERSION: ${{ VERSION }} with: - name: AV_Data_Capture-CLI-${{ env.VERSION }}-MacOS - path: dist - - Linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - - name: Test number_perser.get_number - run: | - python number_parser.py -v - - - name: Set CLOUDSCRAPER_PATH variable - run: | - echo "::set-env name=CLOUDSCRAPER_PATH::$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1)" - - - name : Set Version variable - run: | - echo "::set-env name=VERSION::$(cat AV_Data_Capture.py | grep "version = " | tr -d "version = '")" - - - name: Build with pyinstaller - run: | - pyinstaller \ - --onefile AV_Data_Capture.py \ - --hidden-import ADC_function.py \ - --hidden-import core.py \ - --add-data "$CLOUDSCRAPER_PATH:cloudscraper" - - - name: Copy config.ini - run: | - cp config.ini dist/ - - - name: Upload build artifact - uses: actions/upload-artifact@v1 - env: - VERSION: ${{ VERSION }} - with: - name: AV_Data_Capture-CLI-${{ env.VERSION }}-Linux + name: AV_Data_Capture-CLI-${{ Linux.VERSION.VERION }}-MacOS path: dist