diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 46249ee..c74fa15 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -85,10 +85,11 @@ jobs: with: name: "${{ format('ComicTagger-{0}', runner.os) }}" path: | - dist/*.zip - dist/*.tar.gz - dist/*.dmg - dist/*.AppImage + dist/*.whl + dist/binary/*.zip + dist/binary/*.tar.gz + dist/binary/*.dmg + dist/binary/*.AppImage - name: PyTest run: | diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index a79d953..82c2f8b 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -50,10 +50,6 @@ jobs: python -m tox r -m release shell: bash - - name: "Publish distribution 📦 to PyPI" - if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' - uses: pypa/gh-action-pypi-publish@release/v1 - - name: Get release name if: startsWith(github.ref, 'refs/tags/') shell: bash @@ -70,8 +66,13 @@ jobs: draft: false # upload the single application zip file for each OS and include the wheel built on linux files: | - dist/*.zip - dist/*.tar.gz - dist/*.dmg + dist/binary/*.zip + dist/binary/*.tar.gz + dist/binary/*.dmg + dist/binary*.AppImage dist/*${{ fromJSON('["never", ""]')[runner.os == 'Linux'] }}.whl - dist/*.AppImage + dist/*.tar.gz + + - name: "Publish distribution 📦 to PyPI" + if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/build-tools/zip_artifacts.py b/build-tools/zip_artifacts.py index 38c4bb0..b426d30 100644 --- a/build-tools/zip_artifacts.py +++ b/build-tools/zip_artifacts.py @@ -69,7 +69,9 @@ if __name__ == "__main__": final_name = f"ComicTagger-{__version__}-{platform.system()}" path = pathlib.Path(f"dist/{app_name}") - zip_file = pathlib.Path(f"dist/{final_name}") + binary_path = pathlib.Path("dist/binary") + binary_path.mkdir(parents=True, exist_ok=True) + zip_file = binary_path / final_name if platform.system() == "Darwin": from dmgbuild.__main__ import main as dmg_main @@ -79,7 +81,7 @@ if __name__ == "__main__": "-s", str(pathlib.Path(__file__).parent / "dmgbuild.conf"), f"{app} {__version__}", - f"dist/{final_name}.dmg", + f"{binary_path}.dmg", ] dmg_main() elif platform.system() == "Windows": diff --git a/setup.cfg b/setup.cfg index e51ff49..cddb644 100644 --- a/setup.cfg +++ b/setup.cfg @@ -152,7 +152,6 @@ base = {env:tox_env:testenv} [testenv:format] labels = - release build deps = black>=22 @@ -213,7 +212,6 @@ commands = [testenv:pyinstaller] description = Generate pyinstaller executable labels = - release build base = {env:tox_env:testenv} depends = @@ -242,7 +240,7 @@ deps = requests allowlist_externals = {tox_root}/build/appimagetool-x86_64.AppImage -change_dir = dist +change_dir = {tox_root}/build commands_pre = -python -c 'import shutil; shutil.rmtree("{tox_root}/build/", ignore_errors=True)' python {tox_root}/build-tools/get_appimage.py {tox_root}/build/appimagetool-x86_64.AppImage