From 73fe0a7bade429f85689722999f4292ccb8cc354 Mon Sep 17 00:00:00 2001 From: Sven Luthi Date: Mon, 26 Oct 2026 18:48:38 +0100 Subject: [PATCH] new file: .gitea/workflows/publish.yml new file: .gitignore new file: LICENSE modified: pyproject.toml --- .gitea/workflows/publish.yml | 44 ++++++++++++++++++++++++++++++++++++ .gitignore | 6 +++++ LICENSE | 21 +++++++++++++++++ pyproject.toml | 11 +++++++-- 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/publish.yml create mode 100644 .gitignore create mode 100644 LICENSE diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..930d79f --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,44 @@ +name: Publish Python package to PyPI + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: https://github.com/actions/checkout@v4 + + - name: Set up Python + uses: https://github.com/actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Verify tag matches package version + run: | + TAG="${GITHUB_REF_NAME}" + VERSION="$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")" + if [ "$TAG" != "v$VERSION" ]; then + echo "::error::Tag ${TAG} does not match package version v${VERSION}" + exit 1 + fi + + - name: Install build tools + run: python -m pip install --upgrade build twine + + - name: Build package + run: python -m build + + - name: Check package + run: python -m twine check dist/* + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TWINE_NON_INTERACTIVE: "1" + run: python -m twine upload dist/* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d2f8d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +__pycache__/ +*.py[cod] +build/ +dist/ +*.egg-info/ +.venv/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a7a243a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Sven Luthi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pyproject.toml b/pyproject.toml index d37fe6e..2f10d60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=61"] +requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [project] @@ -8,7 +8,9 @@ version = "1.0.0" description = "NetBox DNS (netbox-plugin-dns) DNS-01 authenticator plugin for Certbot" readme = "README.md" requires-python = ">=3.9" -license = { text = "Apache-2.0" } +license = "MIT" +license-files = ["LICENSE"] +authors = [{ name = "Sven Luthi", email = "dev@sven.luethi.co" }] keywords = ["certbot", "acme", "letsencrypt", "netbox", "dns", "dns-01"] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -16,6 +18,7 @@ classifiers = [ "Intended Audience :: System Administrators", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP", "Topic :: Security", ] @@ -25,6 +28,10 @@ dependencies = [ "urllib3>=1.26", ] +[project.urls] +Homepage = "https://git.luethi.co/sven/certbot-dns-netbox" +Repository = "https://git.luethi.co/sven/certbot-dns-netbox.git" + [project.entry-points."certbot.plugins"] dns-netbox = "certbot_dns_netbox.dns_netbox:Authenticator"