Publish to PyPI #103
This file contains hidden or 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 to PyPI | |
on: | |
workflow_run: | |
workflows: ["Tests"] | |
types: | |
- completed | |
branches: | |
- main | |
jobs: | |
pypi-publish: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Flit | |
run: pip install flit | |
- name: Build Package | |
run: flit build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true |