File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,16 @@ jobs:
2626 TAG_NO_PREFIX=$(echo "$TAG" | sed 's/^refs\/tags\///')
2727 # Extract the path of the module to publish from the tag
2828 PACKAGE_PATH=$(echo "$TAG_NO_PREFIX" | rev | cut -d'/' -f2- | rev)
29- # Save the path to the module for use in the build/publish step to only update the module associated with this tag
29+ # Extract version to publish from tag
30+ VERSION="${TAG_NO_PREFIX##*/}"
31+ echo $VERSION
32+ # Save the path to the module and the version for use in the build/publish step to only update the module associated with this tag
3033 echo "PACKAGE_PATH=$PACKAGE_PATH" >> $GITHUB_ENV
34+ echo "VERSION=$VERSION" >> $GITHUB_ENV
3135 - name : Build & Publish to PyPi
3236 run : |
3337 pip install poetry
34- cd $PACKAGE_PATH
38+ cd $PACKAGE_PATH
39+ # replace version
40+ sed -i "s/^version =.*/version = \"${VERSION}\"/" pyproject.toml
3541 poetry publish --build --username="__token__" --no-interaction --password="${{ secrets.PYPI_TOKEN }}"
You can’t perform that action at this time.
0 commit comments