⭐️ Fixes #1 (not available metadata). GitHub action for GUI build created on macOS.
This commit is contained in:
@@ -17,14 +17,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up the environment
|
- name: Set up the environment
|
||||||
uses: ./.github/actions/setup-poetry-env
|
uses: ./.github/actions/setup-poetry-env
|
||||||
|
|
||||||
- name: Export tag
|
- name: Export tag
|
||||||
id: vars
|
id: vars
|
||||||
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
|
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
@@ -33,13 +30,25 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||||
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
||||||
|
|
||||||
- name: GitHub Release
|
- name: GitHub Release
|
||||||
|
id: release_create
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
draft: false
|
draft: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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:
|
deploy-docs:
|
||||||
needs: publish
|
needs: publish
|
||||||
@@ -47,10 +56,75 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up the environment
|
- name: Set up the environment
|
||||||
uses: ./.github/actions/setup-poetry-env
|
uses: ./.github/actions/setup-poetry-env
|
||||||
|
|
||||||
- name: Deploy documentation
|
- name: Deploy documentation
|
||||||
run: poetry run mkdocs gh-deploy --force
|
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}}
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# v0.4.11
|
||||||
|
|
||||||
|
- Fixes regarding empty metadata tags (also fixes #1).
|
||||||
|
- CLI downloader extended to handle playlists and mixes.
|
||||||
|
- `Download.track()` now handles logger functions.
|
||||||
|
- GUI build for macOS and asset upload.
|
||||||
|
|
||||||
# v0.4.9
|
# v0.4.9
|
||||||
|
|
||||||
- Fixed: Exception on missing file read (config, token) instead of creation.
|
- Fixed: Exception on missing file read (config, token) instead of creation.
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
app_name = "TIDAL-Downloader-NG"
|
||||||
|
app_path_dist = "dist"
|
||||||
|
path_asset = "tidal_dl_ng/ui"
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: ## Install the poetry environment and install the pre-commit hooks
|
install: ## Install the poetry environment and install the pre-commit hooks
|
||||||
@echo "🚀 Creating virtual environment using pyenv and poetry"
|
@echo "🚀 Creating virtual environment using pyenv and poetry"
|
||||||
@@ -53,14 +57,32 @@ docs: ## Build and serve the documentation
|
|||||||
help:
|
help:
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
# TODO: macos Signing: https://gist.github.com/txoof/0636835d3cc65245c6288b2374799c43
|
|
||||||
.PHONY: gui
|
.PHONY: gui
|
||||||
gui: ## Build and serve the documentation
|
gui: ## Build GUI app with PyInstaller
|
||||||
@poetry run pyinstaller --noconfirm \
|
@poetry run pyinstaller --noconfirm \
|
||||||
--windowed --onefile \
|
--windowed --onefile \
|
||||||
--name "TIDAL Downloader NG" \
|
--name "TIDAL Downloader NG" \
|
||||||
--noupx \
|
--noupx \
|
||||||
--icon tidal_dl_ng/ui/icon.png \
|
--icon $(path_asset)/icon.png \
|
||||||
tidal_dl_ng/gui.py
|
tidal_dl_ng/gui.py
|
||||||
|
|
||||||
|
# TODO: macos Signing: https://gist.github.com/txoof/0636835d3cc65245c6288b2374799c43
|
||||||
|
.PHONY: gui-macos
|
||||||
|
gui-mac: gui ## Package GUI in a *.dmg file
|
||||||
|
@poetry run mkdir -p $(app_path_dist)/dmg
|
||||||
|
@poetry run mv "$(app_path_dist)/$(app_name).app" $(app_path_dist)/dmg
|
||||||
|
@poetry run create-dmg \
|
||||||
|
--volname "$(app_name)" \
|
||||||
|
--volicon "$(path_asset)/icon.icns" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 800 600 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon "$(app_name).app" 175 120 \
|
||||||
|
--hide-extension "$(app_name).app" \
|
||||||
|
--app-drop-link 425 120 \
|
||||||
|
"$(app_path_dist)/$(app_name).dmg" \
|
||||||
|
"$(app_path_dist)/dmg/"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "tidal-dl-ng"
|
name = "tidal-dl-ng"
|
||||||
version = "0.4.11"
|
version = "0.4.12"
|
||||||
description = "TIDAL Medial Downloader Next Generation!"
|
description = "TIDAL Medial Downloader Next Generation!"
|
||||||
authors = ["Robert Honz <cen.sored@gmail.com>"]
|
authors = ["Robert Honz <cen.sored@gmail.com>"]
|
||||||
repository = "https://github.com/exislow/tidal-dl-ng"
|
repository = "https://github.com/exislow/tidal-dl-ng"
|
||||||
@@ -13,7 +13,7 @@ packages = [
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "tidal-dl-ng"
|
name = "tidal-dl-ng"
|
||||||
authors = ["Robert Honz <cen.sored@gmail.com>"]
|
authors = ["Robert Honz <cen.sored@gmail.com>"]
|
||||||
version = "0.4.11"
|
version = "0.4.12"
|
||||||
description = "TIDAL Medial Downloader Next Generation!"
|
description = "TIDAL Medial Downloader Next Generation!"
|
||||||
repository = "https://github.com/exislow/tidal-dl-ng"
|
repository = "https://github.com/exislow/tidal-dl-ng"
|
||||||
documentation = "https://exislow.github.io/tidal-dl-ng/"
|
documentation = "https://exislow.github.io/tidal-dl-ng/"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user