Skip to content

Commit

Permalink
🐛 GitHub Actions: Try to fix setuptools + git tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegerber committed Aug 1, 2023
1 parent d87fe4e commit 1735872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-check-version-tag
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# We call setuptools.setup() here as we may rely on setuptools to interpret
# a dynamic version field. (Reading pyproject.toml is not enough in that case.)
expected_git_tag="v$(python -c 'from setuptools import setup; setup()' --version)"
actual_git_tag="$(git describe)"
actual_git_tag="$(git describe --tags)"

if [[ "$expected_git_tag" == "$actual_git_tag" ]]; then
echo "OK: Python package version $expected_git_tag matches git tag"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Check git tag vs package version
run: python3 -m pip install --upgrade setuptools && git fetch --tags & git fetch --tags && .github/workflows/release-check-version-tag
run: python3 -m pip install --upgrade setuptools && .github/workflows/release-check-version-tag
- name: Build package
run: python3 -m pip install --upgrade build && python3 -m build
- name: Upload dist
Expand Down

0 comments on commit 1735872

Please sign in to comment.