PyPI Automated publish #2
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: PyPI Automated publish | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Build and dry publish | |
if: github.event_name == 'pull_request' | |
run: | | |
poetry build | |
poetry publish --dry-run | |
- name: Build and publish | |
if: github.event_name != 'pull_request' | |
run: | | |
poetry build | |
poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} |