Skip to content

Commit 281d6d8

Browse files
committed
fix pypi-publish action
1 parent a4ae77f commit 281d6d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/pypi-publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ 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
1819
echo "CONDA_VERSION=$(cat conda.recipe/meta.yaml | grep -oP '(version\:.*)' | head -n 1 | sed 's/version\:\s/v/')" >> $GITHUB_ENV
1920
echo "TAG_VERSION=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
2021
- name: Check changelog release version
@@ -33,6 +34,9 @@ jobs:
3334
pip install pyct \
3435
wheel \
3536
setuptools
37+
- name: Update publish version
38+
run: |
39+
sed -i "/name='.*',/a \ \ version='$PUBLISH_VERSION'," setup.py
3640
- name: Build package
3741
run: |
3842
python setup.py sdist bdist_wheel

0 commit comments

Comments
 (0)