diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 94ffdb2..c4663fe 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -26,6 +26,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + with: + fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index e1ad049..a304e3b 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -20,11 +20,14 @@ jobs: publish-to-pypi: name: Publish Python distribution to PyPI runs-on: ubuntu-latest + permissions: id-token: write # IMPORTANT: this permission is mandatory for OIDC publishing + environment: name: pypi url: https://pypi.org/p/python-cmethods + steps: - name: Download all the distributions uses: actions/download-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index d303183..9a100d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ include-package-data = false [tool.setuptools.packages.find] include = ["cmethods*"] -exclude = ["doc*", "tests*", "examples*", ".env"] +exclude = ["doc*", "tests*", "examples*", ".env", "venv"] [tool.setuptools_scm] write_to = "cmethods/_version.py"