v0.0.24 #30
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: Upload Python Package | |
on: | |
release: | |
types: [published] # Trigger only when a release is published, not when a release is drafted | |
permissions: | |
contents: write # Needed to upload artifacts to the release | |
id-token: write # Needed for OIDC PyPI publishing | |
jobs: | |
build_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Build package | |
run: | | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
poetry config repositories.testpypi https://test.pypi.org/legacy/ | |
poetry dynamic-versioning --no-cache | |
poetry build | |
- name: Upload wheel to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/*.whl | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
- name: Publish | |
uses: pypa/[email protected] |