Skip to content

Commit 8563aa7

Browse files
committed
fix(ci): use run_number for unique TestPyPI dev versions
run_attempt resets on each push (always 1 unless re-run). run_number is monotonically increasing per workflow — guarantees unique versions.
1 parent 1e6b7a1 commit 8563aa7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
- name: Set dev version for TestPyPI
3737
env:
3838
PR_NUMBER: ${{ github.event.pull_request.number }}
39-
RUN_ATTEMPT: ${{ github.run_attempt }}
39+
RUN_NUMBER: ${{ github.run_number }}
4040
run: |
41-
# Generate unique dev version: 0.7.0.dev88.1 (PR #88, attempt 1)
41+
# Unique dev version per workflow run: 0.7.0.dev88<run_number>
4242
BASE_VERSION=$(python -c "from argus import __version__; print(__version__)")
43-
DEV_VERSION="${BASE_VERSION}.dev${PR_NUMBER}${RUN_ATTEMPT}"
43+
DEV_VERSION="${BASE_VERSION}.dev${PR_NUMBER}${RUN_NUMBER}"
4444
echo "Dev version: ${DEV_VERSION}"
4545
4646
# Temporarily patch __init__.py for the build

0 commit comments

Comments
 (0)