Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build package before checking version #193

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ jobs:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Setup Poetry
uses: Gr1N/setup-poetry@v9
- name: Install deps
run: poetry install
- name: Assert tag version matches __version__ attribute
run: |
pushd aleph_alpha_client
python -c "from version import __version__; \
poetry run python -c "import sys; sys.path.pop(0); \
from aleph_alpha_client 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
Expand Down