From 8dcd971cc11ab3449eea01419ec1676d5d5e53c8 Mon Sep 17 00:00:00 2001 From: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:24:03 +0000 Subject: [PATCH] get tags for dynamic versioning --- .github/workflows/python-package.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f655df4f9..9cd9ceb78 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -166,6 +166,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + with: + fetch-depth: 1 # shallow clone + - name: Fetch tags for dynamic versioning in setup.py + run: | + git fetch --depth=1 origin --tags + echo "Available Git tags:" + git tag -n - name: Download build artifact uses: actions/download-artifact@v4 with: @@ -183,7 +190,8 @@ jobs: python-version: ${{ matrix.python-version }} cache: pip - run: pip install build wheel - - run: python -m build . + # for now need to do the below instead of prior `python -m build .`, which didn't allow us to access git tags + - run: python -m build --sdist && python -m build --wheel - name: Determine and Set Platform Tag, then Tag Wheel shell: bash run: |