From 03e094a4973d12dabf40766572bb423fdbf185a1 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:43:08 -0700 Subject: [PATCH] ci: add pipeline --- .woodpecker.yml | 36 +++++++++++++++++++++++++++++++++ pyproject.toml | 11 +++++++++- python_sponsorblock/_version.py | 16 +++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yml create mode 100644 python_sponsorblock/_version.py diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..f8713e8 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,36 @@ +labels: + platform: linux/amd64 + +steps: + build: + image: python + commands: + - python -m pip install hatch + - python -m unittest + - hatch build + when: + - event: manual + - event: tag + + publish-gitea: + image: gitea.elara.ws/music-kraken/plugin-twine + settings: + repository_url: "https://gitea.elara.ws/api/packages/music-kraken/pypi" + username: + from_secret: gitea_username + password: + from_secret: gitea_password + when: + - event: manual + - event: tag + + publish-pypi: + image: gitea.elara.ws/music-kraken/plugin-twine + settings: + username: + from_secret: pypi_username + password: + from_secret: pypi_password + when: + - event: manual + - event: tag diff --git a/pyproject.toml b/pyproject.toml index 8fb4f01..40495b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,16 @@ include = ["python_sponsorblock/*.py", "python_sponsorblock/**/*.py" ] packages = ["python_sponsorblock"] [tool.hatch.version] -path = "python_sponsorblock/__about__.py" +source = "vcs" +path = "python_sponsorblock/_version.py" +fallback-version = "0.0.0" + +[tool.hatch.version.raw-options] +local_scheme = "no-local-version" + +[tool.hatch.build.hooks.vcs] +version-file = "python_sponsorblock/_version.py" + [project] name = "python-sponsorblock" diff --git a/python_sponsorblock/_version.py b/python_sponsorblock/_version.py new file mode 100644 index 0000000..0283081 --- /dev/null +++ b/python_sponsorblock/_version.py @@ -0,0 +1,16 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = '0.1.dev15' +__version_tuple__ = version_tuple = (0, 1, 'dev15')