Skip to content

Commit 0bb23ce

Browse files
committed
fix pypi publish action
1 parent 2ce8a19 commit 0bb23ce

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- name: Get release version
1616
run: |
1717
echo "CHANGELOG_VERSION=$(cat CHANGELOG.md | grep -oP '(?<=###\s)(.*)(?=\s\-)' | head -n 1 | sed 's/Version\s/v/')" >> $GITHUB_ENV
18-
echo "PUBLISH_VERSION=$(cat CHANGELOG.md | grep -oP '(?<=###\s)(.*)(?=\s\-)' | head -n 1 | sed 's/Version\s//')" >> $GITHUB_ENV
1918
echo "TAG_VERSION=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
2019
- name: Check changelog release version
2120
if: ${{ env.TAG_VERSION != env.CHANGELOG_VERSION }}
@@ -28,9 +27,8 @@ jobs:
2827
pip install pyct \
2928
wheel \
3029
setuptools
31-
- name: Update publish version
32-
run: |
33-
sed -i "/name='.*',/a \ \ version='$PUBLISH_VERSION'," setup.py
30+
- name: Get all git tags
31+
run: git fetch --tags -f
3432
- name: Build package
3533
run: |
3634
python setup.py sdist bdist_wheel

0 commit comments

Comments
 (0)