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:
26
26
TAG_NO_PREFIX=$(echo "$TAG" | sed 's/^refs\/tags\///')
27
27
# Extract the path of the module to publish from the tag
28
28
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
30
33
echo "PACKAGE_PATH=$PACKAGE_PATH" >> $GITHUB_ENV
34
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
31
35
- name : Build & Publish to PyPi
32
36
run : |
33
37
pip install poetry
34
- cd $PACKAGE_PATH
38
+ cd $PACKAGE_PATH
39
+ # replace version
40
+ sed -i "s/^version =.*/version = \"${VERSION}\"/" pyproject.toml
35
41
poetry publish --build --username="__token__" --no-interaction --password="${{ secrets.PYPI_TOKEN }}"
You can’t perform that action at this time.
0 commit comments