Publish Release #3
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 Release | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
permissions: | |
contents: read | |
id-token: write # Required for trusted publishing to PyPI | |
jobs: | |
publish-pypi: | |
name: "PyPI" | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Configure Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Configure dependencies | |
run: | | |
pip install --user --upgrade pip | |
pip install --user pipx | |
pipx ensurepath | |
pipx install poetry==1.4.2 | |
poetry config virtualenvs.in-project true | |
poetry install --with dev | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Build release | |
run: | | |
poetry build | |
- name: Publish release | |
uses: pypa/gh-action-pypi-publish@release/v1 |