Skip to content

Upload Python Package #86

Upload Python Package

Upload Python Package #86

Workflow file for this run

name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Assert tag version matches __version__ attribute
run: |
pushd aleph_alpha_client
python -c "from version import __version__; \
git_ref = '${GITHUB_REF#refs/}'; \
assert git_ref.startswith('tags'), \
f'{git_ref} is not a version tag'; \
git_version = '${GITHUB_REF#refs/tags/}'[1:]; \
assert __version__ == git_version, \
f'versions do not match {__version__} vs. {git_version}. Please update version.py to match the git Release tag.'"
popd
- name: Setup Poetry
uses: Gr1N/setup-poetry@v9
- name: Install deps
run: poetry install
- name: Build
run: poetry build
- name: Publish
run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}