Skip to content

Commit 8fd35fe

Browse files
authored
Merge pull request #193 from Aleph-Alpha/fix-version-check
ci: build package before checking version
2 parents cfb997e + 9825d76 commit 8fd35fe

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/python-publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- name: Set up Python
1313
uses: actions/setup-python@v5
14+
with:
15+
python-version: 3.12
16+
- name: Setup Poetry
17+
uses: Gr1N/setup-poetry@v9
18+
- name: Install deps
19+
run: poetry install
1420
- name: Assert tag version matches __version__ attribute
1521
run: |
16-
pushd aleph_alpha_client
17-
python -c "from version import __version__; \
22+
poetry run python -c "import sys; sys.path.pop(0); \
23+
from aleph_alpha_client import __version__; \
1824
git_ref = '${GITHUB_REF#refs/}'; \
1925
assert git_ref.startswith('tags'), \
2026
f'{git_ref} is not a version tag'; \
2127
git_version = '${GITHUB_REF#refs/tags/}'[1:]; \
2228
assert __version__ == git_version, \
2329
f'versions do not match {__version__} vs. {git_version}. Please update version.py to match the git Release tag.'"
24-
popd
25-
- name: Setup Poetry
26-
uses: Gr1N/setup-poetry@v9
27-
- name: Install deps
28-
run: poetry install
2930
- name: Build
3031
run: poetry build
3132
- name: Publish

0 commit comments

Comments
 (0)