Compare commits
1 Commits
2aebaba299
...
1.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
ab399e740a
|
71
.gitea/workflows/release.yml
Normal file
71
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Build and Publish Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: https://git.hogertz.eu/actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: https://git.hogertz.eu/actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
||||||
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: |
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Extract version from release tag
|
||||||
|
id: get_version
|
||||||
|
run: |
|
||||||
|
# Remove 'v' prefix if present (e.g., v1.0.0 -> 1.0.0)
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
VERSION=${VERSION#v}
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Extracted version: $VERSION"
|
||||||
|
|
||||||
|
- name: Update version in pyproject.toml
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.get_version.outputs.version }}"
|
||||||
|
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
|
||||||
|
echo "Updated pyproject.toml to version $VERSION"
|
||||||
|
cat pyproject.toml | grep "^version"
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
uv sync --extra build
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
uv run python -m build
|
||||||
|
|
||||||
|
- name: Create .pypirc
|
||||||
|
run: |
|
||||||
|
cat > ~/.pypirc << EOF
|
||||||
|
[distutils]
|
||||||
|
index-servers = gitea
|
||||||
|
|
||||||
|
[gitea]
|
||||||
|
repository = https://git.hogertz.eu/api/packages/hendrik-hog/pypi
|
||||||
|
username = ${{ secrets.USERNAME }}
|
||||||
|
password = ${{ secrets.PAT }}
|
||||||
|
EOF
|
||||||
|
chmod 600 ~/.pypirc
|
||||||
|
|
||||||
|
- name: Publish to Gitea PyPI
|
||||||
|
run: |
|
||||||
|
uv run python -m twine upload --repository gitea dist/*
|
||||||
|
|
||||||
|
- name: Commit version update
|
||||||
|
run: |
|
||||||
|
git config --local user.email "action@gitea.local"
|
||||||
|
git config --local user.name "Gitea Actions"
|
||||||
|
git add pyproject.toml
|
||||||
|
git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}"
|
||||||
|
git push origin HEAD:main || echo "No changes to push or push failed"
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ corenetworks-credentials.ini
|
|||||||
**.pyc
|
**.pyc
|
||||||
certbot-test
|
certbot-test
|
||||||
*.egg-info
|
*.egg-info
|
||||||
build
|
build
|
||||||
|
dist
|
||||||
@@ -17,6 +17,12 @@ See [Core Networks API Documentation](https://beta.api.core-networks.de/doc/) fo
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
### From Gitea PyPI
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip3 install certbot-dns-corenetworks --index-url https://git.hogertz.eu/api/packages/hendrik-hog/pypi/simple
|
||||||
|
```
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -100,5 +106,5 @@ pytest --cov=certbot_dns_corenetworks --cov-report=html
|
|||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Original author: Masin Al-Dujaili
|
Original author: Masin Al-Dujaili
|
||||||
Maintainer: Hendrik Hogertz
|
Maintainer: Hendrik Hogertz
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies = ["certbot>=2.0.0", "acme>=2.0.0", "requests>=2.20.0"]
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = ["pytest>=7.0.0", "pytest-cov>=4.0.0"]
|
dev = ["pytest>=7.0.0", "pytest-cov>=4.0.0"]
|
||||||
|
build = ["build>=1.0.0", "twine>=4.0.0"]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://git.hogertz.eu/hendrik-hog/certbot-dns-corenetworks"
|
Homepage = "https://git.hogertz.eu/hendrik-hog/certbot-dns-corenetworks"
|
||||||
|
|||||||
Reference in New Issue
Block a user