diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 7caeccd..67b2694 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -11,6 +11,21 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - uses: actions/checkout@master + + - name: get version from tag + id: get_version + run: | + realversion="${GITHUB_REF/refs\/tags\//}" + realversion="${realversion//v/}" + echo "::set-output name=VERSION::$realversion" + + - name: Set the version for publishing + uses: ciiiii/toml-editor@1.0.0 + with: + file: "pyproject.toml" + key: "tool.poetry.version" + value: "${{ steps.get_version.outputs.VERSION }}" + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: