From 4d368dd04d79eed0f0fca93a4c69b996cc92cbbe Mon Sep 17 00:00:00 2001 From: Yaronzz Date: Fri, 1 Apr 2022 15:04:26 +0800 Subject: [PATCH] update workflow --- .github/workflows/build.yml | 59 ++++++ .../continuous-integration-workflow.yml | 179 ------------------ .gitignore | 2 + 3 files changed, 61 insertions(+), 179 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/continuous-integration-workflow.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..115bf16 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Build exe + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + + # Platforms to build on/for + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install dependencies + shell: bash + run: | + pip3 install wheel + pip3 install pyinstaller + pip3 install PyQt5 + pip3 install -r requirements.txt --upgrade + working-directory: TIDALDL-PY + + - name: Clean directory + shell: bash + run: | + rm -rf dist + rm -rf build + rm -rf tidal_dl.egg-info + rm -rf tidal_gui.egg-info + rm -rf MANIFEST.in + working-directory: TIDALDL-PY + + - name: Build tidal-dl + run: | + pyinstaller -F tidal_dl/__init__.py -n tidal-dl + working-directory: TIDALDL-PY + + - name: Build tidal-gui + shell: bash + run: | + cp -rf guiStatic.in MANIFEST.in + pyinstaller -D tidal_gui/__init__.py -w -n tidal-gui --add-data "tidal_gui/resource;resource" + working-directory: TIDALDL-PY + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: tidal-dl-${{ runner.os }} + path: | + TIDALDL-PY/dist/* + + + diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml deleted file mode 100644 index 7ff31b6..0000000 --- a/.github/workflows/continuous-integration-workflow.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: Tidal Media Downloader - -on: [push, pull_request] - -jobs: - BuildWin: - name: Build windows - runs-on: windows-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip3 install wheel - pip3 install pyinstaller - pip3 install PyQt5 - pip3 install -r requirements.txt --upgrade - working-directory: TIDALDL-PY - - - name: Clean directory - shell: bash - run: | - rm -rf dist - rm -rf build - rm -rf tidal_dl.egg-info - rm -rf tidal_gui.egg-info - rm -rf MANIFEST.in - rm -rf exe/tidal-dl.exe - rm -rf exe/tidal-gui.exe - working-directory: TIDALDL-PY - - - name: Build tidal-dl - run: | - pyinstaller -F tidal_dl/__init__.py - mv dist/__init__.exe exe/tidal-dl.exe - working-directory: TIDALDL-PY - - - name: Build tidal-gui - shell: bash - run: | - cp -rf guiStatic.in MANIFEST.in - pyinstaller -F tidal_gui/__init__.py -w - mv dist/__init__.exe exe/tidal-gui.exe - cp -rf tidal_gui/resource exe/ - working-directory: TIDALDL-PY - - - name: Zip exe - shell: bash - run: | - tar -zcvf tidal_dl_win.tar.gz ./* - working-directory: TIDALDL-PY/exe - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: tidal-dl-win - path: | - TIDALDL-PY/exe/tidal_dl_win.tar.gz - - - BuildLinux: - name: Build linux - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip3 install wheel - pip3 install pyinstaller - pip3 install PyQt5 - pip3 install -r requirements.txt --upgrade - working-directory: TIDALDL-PY - - - name: Clean directory - shell: bash - run: | - rm -rf dist - rm -rf build - rm -rf tidal_dl.egg-info - rm -rf tidal_gui.egg-info - rm -rf MANIFEST.in - rm -rf exe/tidal-dl - rm -rf exe/tidal-gui - working-directory: TIDALDL-PY - - - name: Build tidal-dl - run: | - pyinstaller -F tidal_dl/__init__.py - mv dist/__init__ exe/tidal-dl - working-directory: TIDALDL-PY - - - name: Build tidal-gui - shell: bash - run: | - cp -rf guiStatic.in MANIFEST.in - pyinstaller -F tidal_gui/__init__.py -w - mv dist/__init__ exe/tidal-gui - cp -rf tidal_gui/resource exe/ - working-directory: TIDALDL-PY - - - name: Zip exe - shell: bash - run: | - tar -zcvf tidal_dl_linux.tar.gz ./* - working-directory: TIDALDL-PY/exe - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: tidal-dl-linux - path: | - TIDALDL-PY/exe/tidal_dl_linux.tar.gz - - BuildMacOS: - name: Build macOS - runs-on: macOS-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip3 install wheel - pip3 install pyinstaller - pip3 install PyQt5 - pip3 install -r requirements.txt --upgrade - working-directory: TIDALDL-PY - - - name: Clean directory - shell: bash - run: | - rm -rf dist - rm -rf build - rm -rf tidal_dl.egg-info - rm -rf tidal_gui.egg-info - rm -rf MANIFEST.in - rm -rf exe/tidal-dl - rm -rf exe/tidal-gui - working-directory: TIDALDL-PY - - - name: Build tidal-dl - run: | - pyinstaller -F tidal_dl/__init__.py - mv dist/__init__ exe/tidal-dl - working-directory: TIDALDL-PY - - - name: Build tidal-gui - shell: bash - run: | - cp -rf guiStatic.in MANIFEST.in - pyinstaller -F tidal_gui/__init__.py -w - mv dist/__init__ exe/tidal-gui - cp -rf tidal_gui/resource exe/ - working-directory: TIDALDL-PY - - - name: Zip exe - shell: bash - run: | - tar -zcvf tidal_dl_macOS.tar.gz ./* - working-directory: TIDALDL-PY/exe - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: tidal-dl-macOS - path: | - TIDALDL-PY/exe/tidal_dl_macOS.tar.gz \ No newline at end of file diff --git a/.gitignore b/.gitignore index 76d200e..45a571b 100644 --- a/.gitignore +++ b/.gitignore @@ -171,3 +171,5 @@ clean.sh TIDALDL-PY/MANIFEST.in TIDALDL-PY/exe/resource TIDALDL-PY/exe/tidal_dl_win.tar.gz +.github/workflows/continuous-integration-workflow copy.yml +TIDALDL-PY/tidal-gui.spec