Merge pull request #985 from HERA-Team/new-release #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |