diff options
| author | Robert Honz <exislow+github@gmail.com> | 2023-12-20 09:17:58 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2023-12-20 09:17:58 +0100 |
| commit | 6bee034064c43c7960f2860bb5bcfcba88fb1d6f (patch) | |
| tree | dd53006b29a71f1794cfc2b2c4246aed704c4a2f /.github/workflows | |
| parent | 71c6c2e05fdf120f37c19c40269e5d05999226d8 (diff) | |
| download | tidal-dl-ng-6bee034064c43c7960f2860bb5bcfcba88fb1d6f.tar.gz | |
⭐️ Fixes #1 (not available metadata). GitHub action for GUI build created on macOS.
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/on-release-master.yml | 88 |
1 files changed, 81 insertions, 7 deletions
diff --git a/.github/workflows/on-release-master.yml b/.github/workflows/on-release-master.yml index 4ea640a..616ede5 100644 --- a/.github/workflows/on-release-master.yml +++ b/.github/workflows/on-release-master.yml @@ -17,14 +17,11 @@ jobs: steps: - name: Check out uses: actions/checkout@v3 - - name: Set up the environment uses: ./.github/actions/setup-poetry-env - - name: Export tag id: vars run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT - - name: Build and publish run: | source .venv/bin/activate @@ -33,13 +30,25 @@ jobs: env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} RELEASE_VERSION: ${{ steps.vars.outputs.tag }} - - name: GitHub Release + id: release_create uses: softprops/action-gh-release@v1 with: draft: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Output Release URL File + run: echo "${{ steps.release_create.outputs.upload_url }}" > release_upload_url.txt + - name: Save Release URL File for publish + uses: actions/upload-artifact@v1 + with: + name: release_url + path: release_url.txt + - name: Save Upload URL File for publish + uses: actions/upload-artifact@v1 + with: + name: release_release_upload_url + path: release_upload_url.txt deploy-docs: needs: publish @@ -47,10 +56,75 @@ jobs: steps: - name: Check out uses: actions/checkout@v3 - - name: Set up the environment uses: ./.github/actions/setup-poetry-env - - name: Deploy documentation run: poetry run mkdocs gh-deploy --force -# TODO: Build Qt GUI Standalone. + + build-gui-and-upload-assets: + needs: publish + env: + OUT_NAME_FILE: "TIDAL-Downloader-NG" + ASSET_MIME: "application/zip" + ASSET_EXTENSION: ".zip" + strategy: + fail-fast: false + matrix: + #os: ["ubuntu-20.04", "windows-2019", "macos-11", "macos-13"] + include: + - os: "macos-11" + TARGET: "macos-11" + CMD_BUILD: > + brew install create-dmg && + source .venv/bin/activate && + poetry run make gui-macos && + cd dist && + zip -r ${{env.OUT_NAME_FILE}}${{env.ASSET_EXTENSION}} ${{env.OUT_NAME_FILE}}.dmg -x "*.DS_Store" + # - os: "windows-2019" + # TARGET: "windows-2019" + # CMD_BUILD: pyinstaller -F -w -n clipster -i resources/clipster.ico cli.py + runs-on: ${{ matrix.os }} + steps: + - name: Check out + uses: actions/checkout@v3 + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + # architecture: "x64" + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Install dependencies + run: poetry install --no-interaction --all-extras --with dev + - name: Build with pyinstaller for ${{matrix.TARGET}} + run: ${{matrix.CMD_BUILD}} + - name: Load Release URL File from release job + uses: actions/download-artifact@v1 + with: + name: release_url + - name: Get Release File Name & Upload URL + id: get_release_info + shell: bash + run: | + value=`cat release_url/release_url.txt` + echo ::set-output name=release_upload_url::$value + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + upload_url: ${{steps.get_release_info.outputs.release_upload_url}} + asset_path: ./dist/${{env.OUT_NAME_FILE}}${{env.ASSET_EXTENSION}} + asset_name: ${{env.OUT_NAME_FILE}}${{env.ASSET_EXTENSION}} + asset_content_type: ${{env.ASSET_MIME}} |
