diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 42b7a66..fedb8bf 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,6 +10,7 @@ on: env: TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} GITHUB_API_TOKEN: ${{secrets.API_TOKEN}} + CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} jobs: build: @@ -49,7 +50,7 @@ jobs: - run: mk docs if: | - matrix.python-version == '3.11' + matrix.python-version == '3.12' && matrix.system == 'ubuntu-latest' - run: mk python-test @@ -57,21 +58,25 @@ jobs: PY_TEST_EXTRA_ARGS: --cov-report=xml - uses: codecov/codecov-action@v3.1.5 + with: + fail_ci_if_error: true + verbose: true + token: ${{secrets.CODECOV_TOKEN}} - run: mk pypi-upload-ci env: TWINE_USERNAME: __token__ if: | - matrix.python-version == '3.11' + matrix.python-version == '3.12' && matrix.system == 'ubuntu-latest' && env.TWINE_PASSWORD != '' && github.ref_name == 'master' - run: | mk python-release owner=vkottler \ - repo=vmklib version=2.0.1 + repo=vmklib version=2.0.2 if: | - matrix.python-version == '3.11' + matrix.python-version == '3.12' && matrix.system == 'ubuntu-latest' && env.GITHUB_API_TOKEN != '' && github.ref_name == 'master' diff --git a/README.md b/README.md index d32b795..78f40fb 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ===================================== generator=datazen version=3.1.4 - hash=68e3174cbaf5e937620f00c5fe69e651 + hash=fcfed0c41e658545e35e4948bff221a8 ===================================== --> -# vmklib ([2.0.1](https://pypi.org/project/vmklib/)) +# vmklib ([2.0.2](https://pypi.org/project/vmklib/)) [![python](https://img.shields.io/pypi/pyversions/vmklib.svg)](https://pypi.org/project/vmklib/) ![Build Status](https://github.com/vkottler/vmklib/workflows/Python%20Package/badge.svg) diff --git a/config b/config index 46b7830..2fcfcfb 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 46b783061d5a2f4da63ad8ff7bd8b46b9876fcf7 +Subproject commit 2fcfcfb2c3f3470be6e3d55f75e9d68fbd948f7f diff --git a/local/variables/package.yaml b/local/variables/package.yaml index 54a6a2b..3f60c49 100644 --- a/local/variables/package.yaml +++ b/local/variables/package.yaml @@ -1,5 +1,5 @@ --- major: 2 minor: 0 -patch: 1 +patch: 2 entry: mk diff --git a/pyproject.toml b/pyproject.toml index 0f3a492..28d682d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [project] name = "vmklib" -version = "2.0.1" +version = "2.0.2" description = "Simplify project workflows by standardizing use of GNU Make." readme = "README.md" requires-python = ">=3.10" diff --git a/tests/test_entry.py b/tests/test_entry.py index 3d6317c..364f97d 100644 --- a/tests/test_entry.py +++ b/tests/test_entry.py @@ -3,7 +3,7 @@ """ # built-in -from contextlib import ExitStack, contextmanager +from contextlib import ExitStack, contextmanager, suppress from multiprocessing import Process import os import signal @@ -32,7 +32,8 @@ def test_interrupt(): proc.start() time.sleep(0.5) assert isinstance(proc.pid, int) - os.kill(proc.pid, signal.SIGINT) + with suppress(PermissionError): + os.kill(proc.pid, signal.SIGINT) proc.join() diff --git a/vmklib/__init__.py b/vmklib/__init__.py index 1f29e0b..9d4308c 100644 --- a/vmklib/__init__.py +++ b/vmklib/__init__.py @@ -1,7 +1,7 @@ # ===================================== # generator=datazen # version=3.1.4 -# hash=0b06924a9490f122f646f491d43e5fd6 +# hash=a189f4011428578af1bb711f90f3f283 # ===================================== """ @@ -10,4 +10,4 @@ DESCRIPTION = "Simplify project workflows by standardizing use of GNU Make." PKG_NAME = "vmklib" -VERSION = "2.0.1" +VERSION = "2.0.2" diff --git a/vmklib/tasks/release.py b/vmklib/tasks/release.py index 965ea85..da4ec70 100644 --- a/vmklib/tasks/release.py +++ b/vmklib/tasks/release.py @@ -82,21 +82,29 @@ async def release( "generate_release_notes": True, }, ) + + self.log.info("Create-release result: '%s'.", result) + if "message" in result and result["message"] == "Validation Failed": self.log.warning("Release at current version already exists.") return True - release_id = result["id"] + success = False - # Use 'Upload a release asset' API to upload all files in the 'dist' - # directory to the new release. - for item in cwd.joinpath(dist).iterdir(): - result = await self.upload_release_asset( - owner, repo, release_id, item - ) - self.log.info("Uploaded '%s'.", result["browser_download_url"]) + if "id" in result: + release_id = result["id"] + + # Use 'Upload a release asset' API to upload all files in the + # 'dist' directory to the new release. + for item in cwd.joinpath(dist).iterdir(): + result = await self.upload_release_asset( + owner, repo, release_id, item + ) + self.log.info("Uploaded '%s'.", result["browser_download_url"]) + + success = True - return True + return success async def run( self,