Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zakiali committed Aug 28, 2024
1 parent 93d810f commit 5cfe210
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pypi_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '**'
tags:
- 'v*'

Expand All @@ -27,7 +28,7 @@ jobs:
id: check_version
run: |
NEW_VERSION=$(echo "$GITHUB_REF" | sed -E 's/refs\/tags\/v(.+)/\1/')
CURRENT_VERSION=$(python -c "import toml; from packaging.version import parse as parse_version; print(parse_version(toml.load('pyproject.toml')['project']['version']))")
CURRENT_VERSION=$(grep '^version =' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
if python -c "from packaging.version import parse as parse_version; exit(0 if parse_version('$NEW_VERSION') > parse_version('$CURRENT_VERSION') else 1)"; then
echo "::set-output name=new_version::true"
else
Expand All @@ -38,5 +39,5 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') && steps.check_version.outputs.new_version == 'true'
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN_TEMP }}
password: ${{ secrets.PYPI_TOKEN_TEMP_DOES_NOT_EXIST }}
packages_dir: ./dist/

0 comments on commit 5cfe210

Please sign in to comment.