Added PyPi package build process

This commit is contained in:
Florian 2025-11-08 11:28:46 +01:00
parent f415aed975
commit 18b7d790ae
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

@ -8,7 +8,7 @@ authors = [{ name = "Florian Gänsejunge" }]
dependencies = ["simple-logger-handler @ git+https://git.gansejunge.com/notifier/lib-logger-handler.git@main"] dependencies = ["simple-logger-handler @ git+https://git.gansejunge.com/notifier/lib-logger-handler.git@main"]
[build-system] [build-system]
requires = ["setuptools>=61"] requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project.urls] [project.urls]