Skip to content

Commit

Permalink
Update versioning logic in publish-to-pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
magico13 committed Mar 3, 2024
1 parent 78682dc commit 2ad9734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
# If the branch is master, set to a release candidate version
sed -i "s/VERSION = \".*\"/VERSION = \"$(cat pyemvue/__version__.py | grep -oP '(?<=VERSION = \").*(?=\")').rc${{ github.run_number }}\"/" pyemvue/__version__.py
elif [ "${{ github.ref }}" != "refs/tags/*" ]; then
elif [[ ! "${{ github.ref }}" =~ ^refs/tags/.* ]]; then
# If the branch is not master and not a tag, set to a development version
sed -i "s/VERSION = \".*\"/VERSION = \"$(cat pyemvue/__version__.py | grep -oP '(?<=VERSION = \").*(?=\")').dev${{ github.run_number }}\"/" pyemvue/__version__.py
fi
Expand Down

0 comments on commit 2ad9734

Please sign in to comment.