@@ -37,12 +37,14 @@ jobs:
3737 id : version
3838 run : |
3939 $VERSION = (Get-Content pyproject.toml | Select-String -Pattern 'version = "(.*)"').Matches.Groups[1].Value
40+ $VERSION = $VERSION -replace '^v', '' # Remove 'v' prefix if present
4041 echo "VERSION=$VERSION" >> $env:GITHUB_ENV
4142 echo "version=$VERSION" >> $env:GITHUB_OUTPUT
4243
4344 # For tags, extract the tag version
4445 if ("${{ github.ref }}".StartsWith("refs/tags/")) {
4546 $TAG_VERSION = "${{ github.ref }}".Substring(10) # Remove 'refs/tags/' prefix
47+ $TAG_VERSION = $TAG_VERSION -replace '^v', '' # Remove 'v' prefix if present
4648 echo "TAG_VERSION=$TAG_VERSION" >> $env:GITHUB_ENV
4749 }
4850
@@ -58,11 +60,11 @@ jobs:
5860 run : |
5961 # Rename dist files to include RC and issue number
6062 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 }}- "
6264 Rename-Item -Path $_.FullName -NewName $newName
6365 }
6466 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 }}"
6668 Rename-Item -Path $_.FullName -NewName $newName
6769 }
6870 twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
@@ -112,7 +114,7 @@ jobs:
112114 This is a release candidate version published to Test PyPI.
113115
114116 ```
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/
116118 ```
117119 "@
118120 })
0 commit comments