Skip to content

Commit 8dcd971

Browse files
get tags for dynamic versioning
1 parent 6927dcc commit 8dcd971

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/python-package.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ jobs:
166166
runs-on: ${{ matrix.os }}
167167
steps:
168168
- uses: actions/checkout@v4
169+
with:
170+
fetch-depth: 1 # shallow clone
171+
- name: Fetch tags for dynamic versioning in setup.py
172+
run: |
173+
git fetch --depth=1 origin --tags
174+
echo "Available Git tags:"
175+
git tag -n
169176
- name: Download build artifact
170177
uses: actions/download-artifact@v4
171178
with:
@@ -183,7 +190,8 @@ jobs:
183190
python-version: ${{ matrix.python-version }}
184191
cache: pip
185192
- run: pip install build wheel
186-
- run: python -m build .
193+
# for now need to do the below instead of prior `python -m build .`, which didn't allow us to access git tags
194+
- run: python -m build --sdist && python -m build --wheel
187195
- name: Determine and Set Platform Tag, then Tag Wheel
188196
shell: bash
189197
run: |

0 commit comments

Comments
 (0)