Skip to content

Merge pull request #544 from maps-as-data/explore_fix #41

Merge pull request #544 from maps-as-data/explore_fix

Merge pull request #544 from maps-as-data/explore_fix #41

# Adapted from https://github.com/alan-turing-institute/scivision/blob/main/.github/workflows/publish-to-pypi.yml
name: Publish Tagged Python 🐍 distributions 📦 to PyPI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- v*
jobs:
build-and-publish:
name: Publish Tagged Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python3 -m build --sdist --wheel --outdir dist/
- name: Publish tagged build to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}