Skip to content

Commit 616c539

Browse files
Rafal Maciagclaude
andcommitted
Fix Python preview version to be PEP 440 compliant
- NuGet: 1.1.34-preview.a66d687 (unchanged) - PyPI: 1.1.34.dev<run_number> (PEP 440 compliant) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a66d687 commit 616c539

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/preview-publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,22 @@ jobs:
161161

162162
- name: Create VERSION file
163163
run: |
164-
VERSION="${{ needs.preview-version.outputs.version }}"
164+
# Convert NuGet version to PEP 440 compliant version
165+
# NuGet: 1.1.34-preview.a66d687 -> PyPI: 1.1.34.dev<run_number>
166+
NUGET_VERSION="${{ needs.preview-version.outputs.version }}"
167+
RUN_NUMBER="${{ github.run_number }}"
168+
169+
# Extract base version (before -preview)
170+
BASE_VERSION=$(echo "$NUGET_VERSION" | sed 's/-preview.*//')
171+
172+
# Create PEP 440 compliant version: X.Y.Z.devN (development release)
173+
PEP440_VERSION="${BASE_VERSION}.dev${RUN_NUMBER}"
174+
175+
echo "NuGet version: $NUGET_VERSION"
176+
echo "PEP 440 version: $PEP440_VERSION"
177+
165178
cd python
166-
echo "$VERSION" > VERSION
179+
echo "$PEP440_VERSION" > VERSION
167180
168181
- name: Install build dependencies
169182
run: |

0 commit comments

Comments
 (0)