v1.9.5-rc1 #156
Workflow file for this run
This file contains hidden or 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 Python Package | |
# Upload to PyPI is triggered by creating & publishing a release in GitHub UI | |
on: | |
release: | |
# Trigger the workflow only for real releases but not for draft releases | |
types: [created] | |
jobs: | |
build: | |
name: Build Python π distributions π¦ for publishing to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
# Checkout the code including tags required for dynamic versioning | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5.6.0 | |
with: | |
python-version: 3.13 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
pipx inject poetry poetry-dynamic-versioning | |
- name: Build source and wheel archives | |
run: | | |
poetry build | |
- name: Store built distribution | |
uses: actions/upload-artifact@v4.6.2 | |
with: | |
name: distribution-files | |
path: dist/ | |
pypi-publish: | |
name: Build and publish Python π package π¦ to PyPI | |
needs: build | |
runs-on: ubuntu-latest | |
# Uses trusted publishing. https://docs.pypi.org/trusted-publishers/adding-a-publisher/ | |
environment: | |
name: pypi-release | |
url: https://pypi.org/p/linkml-runtime | |
permissions: | |
id-token: write # This permission is mandatory for trusted publishing. | |
steps: | |
- name: Download built distribution | |
uses: actions/download-artifact@v4.3.0 | |
with: | |
name: distribution-files | |
path: dist | |
- name: Publish package π¦ to PyPI | |
if: github.event_name == 'release' | |
uses: pypa/gh-action-pypi-publish@v1.12.4 | |
with: | |
verbose: true |