Skip to content

Commit 66c8da0

Browse files
authored
Explicitly checkout tags in build workflow (#284)
* Explicitly checkout tags in build workflow * Also checkout tags when building sdist * Correct YAML workflow syntax
1 parent 4ec8818 commit 66c8da0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ jobs:
5151

5252
steps:
5353
- uses: actions/checkout@v4
54-
54+
with:
55+
fetch-depth: 0
56+
fetch-tags: true
5557
- name: Build wheels
5658
uses: pypa/[email protected]
5759
env:
5860
CIBW_SKIP: pp*-macosx_arm64
59-
6061
- uses: actions/upload-artifact@v4
6162
with:
6263
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
@@ -67,10 +68,11 @@ jobs:
6768
runs-on: ubuntu-latest
6869
steps:
6970
- uses: actions/checkout@v4
70-
71+
with:
72+
fetch-depth: 0
73+
fetch-tags: true
7174
- name: Build sdist
7275
run: pipx run build --sdist
73-
7476
- uses: actions/upload-artifact@v4
7577
with:
7678
name: cibw-sdist
@@ -115,4 +117,3 @@ jobs:
115117
merge-multiple: true
116118
- name: Publish package distribution to PyPI
117119
uses: pypa/gh-action-pypi-publish@release/v1
118-

0 commit comments

Comments
 (0)