diff --git a/.github/workflows/test-publish-pypi.yaml b/.github/workflows/test-publish-pypi.yaml index 94a9615..f179ad9 100644 --- a/.github/workflows/test-publish-pypi.yaml +++ b/.github/workflows/test-publish-pypi.yaml @@ -25,6 +25,19 @@ jobs: python -m pip install --upgrade pip pip install build + - name: Add build number to package version + shell: python + run: | + import toml + + with open("pyproject.toml", "r") as f: + data = toml.load(f) + + data["project"]["version"] = f"{data["project"]["version"]}.dev${{ github.run_id }}" + + with open("pyproject.toml", "w") as f: + toml.dump(data, f) + - name: Build package run: python -m build @@ -34,3 +47,4 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} repository-url: https://test.pypi.org/legacy/ + skip-existing: true diff --git a/pyproject.toml b/pyproject.toml index 09adb34..2b6d939 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "copyright2" -version = "0.1.0" +version = "0.1.1" description = "Text file copyright notice linter and updater." authors = [{name = "Connor Newton", email = "connor@ifthenelse.io" }] readme = "README.md"