Fix release again

Place binaries in dist/binary to make pypa/gh-action-pypi-publish happy
Don't run the formatter and qrc generator during release as it causes issues with setuptools_scm
This commit is contained in:
Timmy Welch 2024-06-29 16:04:27 -07:00
parent c8017c4269
commit 10a1554e73
4 changed files with 19 additions and 17 deletions

View File

@ -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: |

View File

@ -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

View File

@ -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":

View File

@ -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