Package/publish #9
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: Package and publish | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
deploysdist: | |
name: "Deploy to Pypi" | |
runs-on: ${{ vars.RUNNER }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Create distributions | |
shell: bash -l {0} | |
run: | | |
python -m pip install -U build pip | |
python -m build | |
- name: Publish package to PyPI | |
# upload to PyPI on every release for a tag starting with 'v' | |
# if: github.event.action == 'published' && startsWith(github.event.release.tag_name, 'v') | |
uses: pypa/gh-action-pypi-publish@v1.8.10 | |
with: | |
user: ${{ secrets.PYPI_USER }} | |
password: ${{ secrets.PYPI_PASSWORD }} |