Skip to content

Deploy to PyPI

Deploy to PyPI #8

Workflow file for this run

name: Deploy to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine build
- name: Build
run: |
python -m build .
- name: Check that package version matches git tag ${{ github.ref_name }}
shell: bash
run: |
ls -l dist
test -f "dist/stardist_napari-${{ github.ref_name }}.tar.gz"
test -f "dist/stardist_napari-${{ github.ref_name }}-py3-none-any.whl"
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose dist/*