new file: .gitea/workflows/publish.yml
Publish Python package to PyPI / publish (push) Failing after 4s

new file:   .github/workflows/python-publish.yml
new file:   .gitignore
new file:   LICENSE
modified:   README.md
modified:   certbot_dns_netbox/dns_netbox.py
modified:   pyproject.toml
This commit is contained in:
Sven Luthi committed 2026-10-27 10:18:57 +01:00
1 parent 91562ae538
commit 4416d3a645
7 files changed
+186 -40

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
name: Publish Python package to PyPI
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: self-hosted
steps:
- name: Check out repository
uses: https://github.com/actions/checkout@v4
- name: Verify tag matches package version
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="$(python3 -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: python3 -m pip install --upgrade build twine
- name: Build package
run: python3 -m build
- name: Check package
run: python3 -m twine check dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_NON_INTERACTIVE: "1"
run: python3 -m twine upload dist/*