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:
parent
c8017c4269
commit
10a1554e73
9
.github/workflows/build.yaml
vendored
9
.github/workflows/build.yaml
vendored
@ -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: |
|
||||
|
17
.github/workflows/package.yaml
vendored
17
.github/workflows/package.yaml
vendored
@ -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
|
||||
|
@ -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":
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user