nqrduck-measurement/.forgejo/workflows/python-publish.yml
2025-05-01 16:11:34 +02:00

41 lines
No EOL
887 B
YAML

name: Build, Test, and Upload Python Package
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
jobs:
# test:
# uses: ./.github/workflows/ubuntu-python-package.yml # use the callable tests job to run tests
deploy:
runs-on: docker
container:
image: node:22-bookworm
# needs: [test]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt install -y python3 python3-venv python3-pip
- name: Publish to PyPI
run: |
python3 -m venv venv
. ./venv/bin/activate
python3 -m pip install --upgrade pip
pip install -U twine build
python -m build .
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
env:
PYPI: ${{ secrets.PYPI }}