diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b8286e7d..2bdc8cee 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -79,6 +79,14 @@ jobs: echo $MOD_VERSION sed -i "s/^version = \"$VERSION\"/version = \"$MOD_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml + - name: Change version for release build + if: startsWith(github.ref, 'refs/tags/') + run: | + OLD_VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml` + NEW_VERSION=`echo ${GITHUB_REF#refs/tags/} | sed -n 's/^v\(.*\)/\1/p'` + echo $NEW_VERSION + sed -i "s/^version = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml + - name: build Sphinx docs run: poetry run sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build