Skip to content

Commit e0bf6c9

Browse files
authored
Merge pull request #397 from UiPath/feature/nightly_to_testpy
feat(build): move nightly to testpy
2 parents d2853a2 + 9be1a23 commit e0bf6c9

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

.github/workflows/publish-dev.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ jobs:
5151
5252
$PROJECT_NAME = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?name\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
5353
$CURRENT_VERSION = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
54-
$NIGHTLY_NAME = "$PROJECT_NAME-nightly"
5554
5655
5756
# Get PR number and run number with proper padding
@@ -70,10 +69,6 @@ jobs:
7069
# Update version in pyproject.toml
7170
(Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
7271
73-
# Update project name in pyproject.toml
74-
(Get-Content pyproject.toml) -replace "name = `"$PROJECT_NAME`"", "name = `"$NIGHTLY_NAME`"" | Set-Content pyproject.toml
75-
76-
7772
Write-Output "Package version set to $DEV_VERSION"
7873
7974
$dependencyMessage = @"
@@ -85,11 +80,20 @@ jobs:
8580
[project]
8681
dependencies = [
8782
# Exact version:
88-
"$NIGHTLY_NAME==$DEV_VERSION",
83+
"$PROJECT_NAME==$DEV_VERSION",
8984
9085
# Any version from PR
91-
"$NIGHTLY_NAME>=$MIN_VERSION,<$MAX_VERSION"
86+
"$PROJECT_NAME>=$MIN_VERSION,<$MAX_VERSION"
9287
]
88+
89+
[[tool.uv.index]]
90+
name = "testpypi"
91+
url = "https://test.pypi.org/simple/"
92+
publish-url = "https://test.pypi.org/legacy/"
93+
explicit = true
94+
95+
[tool.uv.sources]
96+
$PROJECT_NAME = { index = "testpypi" }
9397
``````
9498
"@
9599
@@ -130,6 +134,7 @@ jobs:
130134
run: uv build
131135

132136
- name: Publish
133-
run: uv publish
137+
run: uv publish --index testpypi
134138
env:
135-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
139+
UV_PUBLISH_TOKEN: ${{ secrets.TESTPYPI_TOKEN }}
140+

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,9 @@ show_missing = true
128128

129129
[tool.coverage.run]
130130
source = ["src"]
131+
132+
[[tool.uv.index]]
133+
name = "testpypi"
134+
url = "https://test.pypi.org/simple/"
135+
publish-url = "https://test.pypi.org/legacy/"
136+
explicit = true

0 commit comments

Comments
 (0)