Skip to content

Commit

Permalink
checkout repo in build correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed May 7, 2024
1 parent 5237000 commit 80ea299
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/_pypi_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 80ea299

Please sign in to comment.