Skip to content

Commit 93833dd

Browse files
committed
fix: disallow local versions when testing packaging
1 parent 85d51a8 commit 93833dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/pypi-package.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
- name: Drop local version suffix for publishable builds
33+
if: github.event_name == 'push'
34+
run: |
35+
if ! grep -q 'local_scheme = "no-local-version"' pyproject.toml; then
36+
sed -i -E \
37+
's#raw-options = [{] version_scheme = "nipreps-calver" [}]#raw-options = { version_scheme = "nipreps-calver", local_scheme = "no-local-version" }#' \
38+
pyproject.toml
39+
fi
40+
grep -n 'raw-options' pyproject.toml
3241
- uses: hynek/build-and-inspect-python-package@v2
3342
with:
3443
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)