{"id":13764401,"url":"https://github.com/pdm-project/setup-pdm","last_synced_at":"2025-05-10T19:30:57.852Z","repository":{"id":43870523,"uuid":"343259430","full_name":"pdm-project/setup-pdm","owner":"pdm-project","description":"A GitHub Action that installs pdm properly for all Python versions","archived":false,"fork":false,"pushed_at":"2025-04-23T07:50:17.000Z","size":2472,"stargazers_count":92,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T20:03:27.754Z","etag":null,"topics":["action","pdm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdm-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["pdm-project","frostming"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null}},"created_at":"2021-03-01T01:45:01.000Z","updated_at":"2025-04-23T07:44:09.000Z","dependencies_parsed_at":"2025-04-19T07:40:14.386Z","dependency_job_id":"0c622f74-a718-48fe-90c2-e5ad96ec3e39","html_url":"https://github.com/pdm-project/setup-pdm","commit_stats":{"total_commits":60,"total_committers":11,"mean_commits":5.454545454545454,"dds":0.4,"last_synced_commit":"7d10bd0f83c65b52c206973185cc64d2e2c63499"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdm-project%2Fsetup-pdm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdm-project%2Fsetup-pdm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdm-project%2Fsetup-pdm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdm-project%2Fsetup-pdm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdm-project","download_url":"https://codeload.github.com/pdm-project/setup-pdm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253470671,"owners_count":21913710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","pdm"],"created_at":"2024-08-03T16:00:20.081Z","updated_at":"2025-05-10T19:30:57.832Z","avatar_url":"https://github.com/pdm-project.png","language":"TypeScript","funding_links":["https://github.com/sponsors/pdm-project","https://github.com/sponsors/frostming"],"categories":["TypeScript","Eco-system"],"sub_categories":[],"readme":"# Setup PDM for GitHub Action\n\nA GitHub Action that installs pdm properly for all Python versions\n\n## Why do I need this action?\n\nNowadays the main reason to use this action is that `actions/setup-python` [doesn't support](https://github.com/actions/setup-python/issues/587#issuecomment-1455797407) caching for PDM out of the box while `setup-pdm` does.\n\nHistorically, this action made it easier to use PDM in repos where the Python version in use was older than the Python version required by PDM. PDM requires \u003e=3.8 but works for projects using older versions.\n\n## Usage\n\nInclude the action in your workflow yaml:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Setup PDM\n    uses: pdm-project/setup-pdm@v4\n    # You are now able to use PDM in your workflow\n  - name: Install dependencies\n    run: pdm install\n```\n\nYou don't need `actions/setup-python` actually.\n\n## Action Inputs\n\nThis action supports the following inputs:\n\n| Input                      | Default               | Description                                                                                                                          |\n| -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| `python-version`           | Not specified         | Version range or exact version of a Python version to use, using SemVer's version range syntax.                                      |\n| `python-version-file`      | `pyproject.toml`      | File containing the Python version to use. Example: .`python-version`                                                                |\n| `architecture`             | `x64`                 | The target architecture (x86, x64, arm64) of the Python interpreter.                                                                        |\n| `allow-python-prereleases` | `false`               | Allow prerelease versions of Python to be installed.                                                                                 |\n| `token`                    | `${{ github.token }}` | Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user. |\n| `version`                  | Not specified         | The version of PDM to install, or 'head' to install from the main branch.                                                            |\n| `prerelease`               | `false`               | Allow prerelease versions of PDM to be installed                                                                                     |\n| `enable-pep582`            | `false`               | Enable PEP 582 package loading globally.                                                                                             |\n| `cache`                    | `false`               | Cache PDM installation.                                                                                                              |\n| `cache-dependency-path`    | `pdm.lock`            | The dependency file(s) to cache.                                                                                                     |\n| `update-python`            | `true`                | Whether to update the environment with the requested Python                                                                          |\n\n## Action Outputs\n\nThis action also exposes the following outputs:\n\n| Output           | Description                                                                       |\n| ---------------- | --------------------------------------------------------------------------------- |\n| `python-version` | The installed Python or PyPy version. Useful when given a version range as input. |\n| `python-path`    | The absolute path to the Python or PyPy executable.                               |\n| `pdm-version`    | The installed PDM version.                                                        |\n| `pdm-bin`        | The absolute path to the PDM executable.                                          |\n\n## Caches\n\nThis action has a built-in cache support. You can use it like this:\n\n```yaml\n- uses: pdm-project/setup-pdm@v3\n  with:\n    python-version: 3.9\n    cache: true\n```\n\nThe default path to calculate the cache key is `./pdm.lock`, you can change it by setting the `cache-dependency-path` input.\n\n**Using a list of file paths to cache dependencies**\n\n```yaml\n- uses: pdm-project/setup-pdm@v3\n  with:\n    python-version: 3.9\n    cache: true\n    cache-dependency-path: |\n      ./pdm.lock\n      ./pdm.new.lock\n```\n\n**Using a glob pattern to cache dependencies**\n\n```yaml\n- uses: pdm-project/setup-pdm@v3\n  with:\n    python-version: 3.9\n    cache: true\n    cache-dependency-path: '**/pdm.lock'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdm-project%2Fsetup-pdm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdm-project%2Fsetup-pdm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdm-project%2Fsetup-pdm/lists"}