Files
2026-10-29 15:34:02 +01:00

32 lines
903 B
YAML

name: Build and Publish Package via local runner
on:
workflow_dispatch:
env:
PIP_EXTRA_INDEX_URL: https://git.gansejunge.com/api/packages/notifier/pypi/simple/
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
pip install -e ".[test]"
- name: Run Tests
run: |
.venv/bin/python -m pytest
- 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/*