Skip to content

Merge pull request #985 from HERA-Team/new-release #18

Merge pull request #985 from HERA-Team/new-release

Merge pull request #985 from HERA-Team/new-release #18

Workflow file for this run

name: Publish Python distributions to PyPI and TestPyPI
on:
push:
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
env:
ENV_NAME: publish
PYTHON: 3.9
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON }}
- name: Install build
run: pip install build twine
- name: Build a binary wheel and a source tarball
run: |
python -m build
- name: Twine Check
run: twine check dist/*
- name: Publish to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PyPI }}