LimeDriverBindings/.github/workflows/python-publish.yml
2024-04-20 10:56:45 +02:00

46 lines
1.1 KiB
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: ubuntu-latest
# needs: [test]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
python -m pip install --upgrade pip
pip install --upgrade pip h5py setuptools wheel build
- name: Publish to PyPI
run: |
python -m venv venv
. ./venv/bin/activate
pip install -U twine build
python -m build .
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
env:
PYPI: ${{ secrets.PYPI }}