Skip to content

Commit

Permalink
ci: automatically set pyproject.toml version on release
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Sep 6, 2023
1 parent cc69a48 commit 1abae0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
# set pyproject.toml version to github.ref_name (without v prefix)
# just in case someone forgot...
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
sed -i 's/^version = ".*"$/version = "'"$VERSION"'"/' pyproject.toml
poetry publish --build --username=__token__ --password=$PYPI_TOKEN

0 comments on commit 1abae0e

Please sign in to comment.