Release to PyPI #10
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: Release to PyPI | |
on: workflow_dispatch | |
jobs: | |
pypi-publish: | |
timeout-minutes: 10 | |
environment: release | |
name: build package and upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Setup venv | |
run: . ./setup_dev_env.sh | |
- name: Bump version as release | |
run: | | |
source venv/bin/activate | |
bump2version --verbose release | |
- name: Build package | |
run: | | |
source venv/bin/activate | |
python -m pip install -U build | |
python -m build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |