Added PyPi package build process

This commit is contained in:
Florian 2025-11-08 11:27:31 +01:00
parent 53dc777419
commit aef6a24dc0
3 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,25 @@
name: Build and Publish Package
on:
workflow_dispatch:
jobs:
build:
runs-on: local
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare environment
run: |
virtualenv -p python3 .venv
source .venv/bin/activate
pip install build twine
- name: Build package
run: .venv/bin/python -m build
- name: Publish package
run: |
.venv/bin/python -m twine upload \
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
-u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \
-p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \
dist/*

View File

@ -0,0 +1,25 @@
name: Build and Publish Package
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare environment
run: |
virtualenv -p python3 .venv
source .venv/bin/activate
pip install build twine
- name: Build package
run: .venv/bin/python -m build
- name: Publish package
run: |
.venv/bin/python -m twine upload \
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
-u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \
-p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \
dist/*

View File

@ -11,7 +11,7 @@ dependencies = ["simple-logger-handler @ git+https://git.gansejunge.com/notifier
encryption = ["cryptography==46.0.2"]
[build-system]
requires = ["setuptools>=61"]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project.urls]