Skip to content

Commit

Permalink
ci: always set version
Browse files Browse the repository at this point in the history
Not only for releases.

Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed Dec 10, 2024
1 parent 624c5a6 commit 2e516fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ jobs:
pip install poetry
- name: Set __version__ and poetry version
if: github.event_name == 'release'
run: |
TAG="$(git describe --tags --abbrev=0)"
echo "__version__ = \"${TAG##*v}\"" > asu/__init__.py
poetry version "${TAG##*v}"
TAG="$(git describe --tags --always | awk -F"-" '{if (NF>1) {print substr($1, 2)".post"$2} else {print substr($1, 2)}}')"
echo "__version__ = \"$TAG\"" > asu/__init__.py
poetry version "$TAG"
- name: Build and publish
if: github.event_name == 'release'
Expand Down

0 comments on commit 2e516fc

Please sign in to comment.