Skip to content

PyPI Publish

PyPI Publish #7

Workflow file for this run

name: PyPI Publish
on:
workflow_dispatch:
jobs:
python-ci:
if: github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags')
uses: ./.github/workflows/python_ci.yaml
publish-to-pypi:
name: Upload release to PyPI
needs: python-ci
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
environment:
name: pypi
url: https://pypi.org/p/sift_py
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Pip install
run: |
python -m pip install --upgrade pip
pip install '.[build]'
pip install .
- name: Build distributions
working-directory: python
run: |
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./python/dist/