@@ -37,12 +37,14 @@ jobs:
37
37
id : version
38
38
run : |
39
39
$VERSION = (Get-Content pyproject.toml | Select-String -Pattern 'version = "(.*)"').Matches.Groups[1].Value
40
+ $VERSION = $VERSION -replace '^v', '' # Remove 'v' prefix if present
40
41
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
41
42
echo "version=$VERSION" >> $env:GITHUB_OUTPUT
42
43
43
44
# For tags, extract the tag version
44
45
if ("${{ github.ref }}".StartsWith("refs/tags/")) {
45
46
$TAG_VERSION = "${{ github.ref }}".Substring(10) # Remove 'refs/tags/' prefix
47
+ $TAG_VERSION = $TAG_VERSION -replace '^v', '' # Remove 'v' prefix if present
46
48
echo "TAG_VERSION=$TAG_VERSION" >> $env:GITHUB_ENV
47
49
}
48
50
@@ -58,11 +60,11 @@ jobs:
58
60
run : |
59
61
# Rename dist files to include RC and issue number
60
62
Get-ChildItem -Path dist -Filter "*.whl" | ForEach-Object {
61
- $newName = $_.Name -replace "(\d+\.\d+\.\d+)", "$1- rc${{ steps.issue.outputs.issue_number }}"
63
+ $newName = $_.Name -replace "(mqpy- \d+\.\d+\.\d+)- ", "`$1. rc${{ steps.issue.outputs.issue_number }}- "
62
64
Rename-Item -Path $_.FullName -NewName $newName
63
65
}
64
66
Get-ChildItem -Path dist -Filter "*.tar.gz" | ForEach-Object {
65
- $newName = $_.Name -replace "(\d+\.\d+\.\d+)", "$1- rc${{ steps.issue.outputs.issue_number }}"
67
+ $newName = $_.Name -replace "(mqpy- \d+\.\d+\.\d+)", "`$1. rc${{ steps.issue.outputs.issue_number }}"
66
68
Rename-Item -Path $_.FullName -NewName $newName
67
69
}
68
70
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
@@ -112,7 +114,7 @@ jobs:
112
114
This is a release candidate version published to Test PyPI.
113
115
114
116
```
115
- pip install mqpy==${{ env.VERSION }}- rc${{ env.ISSUE_NUMBER }} --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/
117
+ pip install mqpy==${{ env.VERSION }}. rc${{ env.ISSUE_NUMBER }} --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/
116
118
```
117
119
"@
118
120
})
0 commit comments