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: Publish with Dynamic Versioning | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
environment: publishing | |
env: | |
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Upgrade pip | |
run: | | |
pip install pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
pipx inject poetry poetry-dynamic-versioning[plugin] | |
poetry --version | |
poetry self show plugins | |
- name: Build | |
run: poetry build | |
- name: Upload wheel to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
file: dist/*.whl | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
- name: Publish | |
uses: pypa/[email protected] |