From 281d6d83bf25912822fbf803c6ed4eb23a216345 Mon Sep 17 00:00:00 2001 From: giancastro Date: Wed, 28 Apr 2021 11:08:09 -0300 Subject: [PATCH] fix pypi-publish action --- .github/workflows/pypi-publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 2f350a53..28b06925 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -15,6 +15,7 @@ jobs: - name: Get release version run: | echo "CHANGELOG_VERSION=$(cat CHANGELOG.md | grep -oP '(?<=###\s)(.*)(?=\s\-)' | head -n 1 | sed 's/Version\s/v/')" >> $GITHUB_ENV + echo "PUBLISH_VERSION=$(cat CHANGELOG.md | grep -oP '(?<=###\s)(.*)(?=\s\-)' | head -n 1 | sed 's/Version\s//')" >> $GITHUB_ENV echo "CONDA_VERSION=$(cat conda.recipe/meta.yaml | grep -oP '(version\:.*)' | head -n 1 | sed 's/version\:\s/v/')" >> $GITHUB_ENV echo "TAG_VERSION=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV - name: Check changelog release version @@ -33,6 +34,9 @@ jobs: pip install pyct \ wheel \ setuptools + - name: Update publish version + run: | + sed -i "/name='.*',/a \ \ version='$PUBLISH_VERSION'," setup.py - name: Build package run: | python setup.py sdist bdist_wheel