Skip to content

Commit 563d288

Browse files
committed
github actions issue
1 parent 2f890f4 commit 563d288

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ jobs:
2222
- uses: actions/setup-python@v5
2323
with:
2424
python-version: "3.12"
25+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2526
- name: Install dependencies
2627
id: set-version
2728
run: |
2829
VERSION=$(grep version pyproject.toml | cut -d= -f2 | tr -d '[:blank:]' | tr -d '"')
29-
[ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=b && VERSION+=$(($(git tag -l "*$VERSION*" | cut -db -f2 | sort -n | tail -1)+1))
30+
VERSION+=b && VERSION+=$(($(git tag -l "*$VERSION*" | cut -db -f2 | sort -n | tail -1)+1))
3031
[ $GITHUB_EVENT_NAME == 'release' ] && VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/}
3132
echo VERSION = $VERSION
3233
sed -ie "s/version = .*/version = \"$VERSION\"/" pyproject.toml

0 commit comments

Comments
 (0)