{"id":18800668,"url":"https://github.com/bitovi/github-actions-publish-github-pypi-handler","last_synced_at":"2026-01-03T22:30:15.084Z","repository":{"id":243066542,"uuid":"810899625","full_name":"bitovi/github-actions-publish-github-pypi-handler","owner":"bitovi","description":"PyPI Publish handler.  Handles requests from Bitovi's 'Publish GitHub PyPI' action","archived":false,"fork":false,"pushed_at":"2024-06-25T20:49:36.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-12-29T19:06:20.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/bitovi.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}},"created_at":"2024-06-05T15:00:44.000Z","updated_at":"2024-06-25T20:49:39.000Z","dependencies_parsed_at":"2024-11-07T22:20:14.279Z","dependency_job_id":"7798a483-32b4-4b88-a1c3-65007aaa638b","html_url":"https://github.com/bitovi/github-actions-publish-github-pypi-handler","commit_stats":null,"previous_names":["bitovi/github-actions-publish-github-pypi-handler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-publish-github-pypi-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-publish-github-pypi-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-publish-github-pypi-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fgithub-actions-publish-github-pypi-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitovi","download_url":"https://codeload.github.com/bitovi/github-actions-publish-github-pypi-handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239734448,"owners_count":19688255,"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":[],"created_at":"2024-11-07T22:19:37.327Z","updated_at":"2026-01-03T22:30:13.003Z","avatar_url":"https://github.com/bitovi.png","language":"Python","readme":"# Handle PyPI Publish Request\n\nThis GitHub Action creates a pull request to upsert the given Python package to a GitHub-hosted PyPI repository.\n\n\u003e **Note:** This action works together with the [Publish to GitHub PyPI](https://github.com/bitovi/github-actions-publish-github-pypi) action to publish a Python package to a GitHub-hosted PyPI repository.\n\n## Table of Contents\n1. [Action Summary](#action-summary)\n2. [Need help or have questions?](#need-help-or-have-questions)\n3. [Pre-requisites](#pre-requisites)\n4. [Basic Use](#basic-use)\n5. [Inputs](#inputs)\n6. [Contributing](#contributing)\n7. [License](#license)\n\n\n## Action Summary\n\nThis action performs the following steps to upsert a Python package to a GitHub-hosted PyPI repository:\n1. Extract details from the `repository_dispatch` inputs\n2. Generate/update files (e.g. `pypi/index.html` and `pypi/[package-name]/index.html`)\n3. Commit changes to a new branch in the PyPI repository.\n4. Create a pull request for review and merge.\n\n\u003e **Note:** This action does does not deploy the resulting PyPI index code anywhere. Essentially, you only need to host the `pypi` directory.  If you'd like to host it on GitHub Pages, you can use our [Static PyPI to GitHub Pages](https://github.com/bitovi/github-actions-static-pypi-to-github-pages) action.\n\nIf you would like to deploy other types of applications, check out our other actions:\n| Action | Purpose |\n| ------ | ------- |\n| [Deploy Docker to EC2](https://github.com/marketplace/actions/deploy-docker-to-aws-ec2) | Deploys a repo with a Dockerized application to a virtual machine (EC2) on AWS |\n| [Deploy Storybook to GitHub Pages](https://github.com/marketplace/actions/deploy-storybook-to-github-pages) | Builds and deploys a Storybook application to GitHub Pages. |\n| [Deploy static site to AWS (S3/CDN/R53)](https://github.com/marketplace/actions/deploy-static-site-to-aws-s3-cdn-r53) | Hosts a static site in AWS S3 with CloudFront |\n\u003cbr/\u003e\n\n**And more!**, check our [list of actions in the GitHub marketplace](https://github.com/marketplace?category=\u0026type=actions\u0026verification=\u0026query=bitovi)\n\n## Need help or have questions?\n\nThis project is supported by [Bitovi, A DevOps consultancy](https://www.bitovi.com/services/devops-consulting).\n\nYou can **get help or ask questions** on our:\n\n- [Discord Community](https://discord.gg/zAHn4JBVcX)\n\nOr, you can hire us for training, consulting, or development. [Set up a free consultation](https://www.bitovi.com/services/devops-consulting).\n\n\n## Pre-requisites\n- A GitHub repository to act as your PyPI.\n- A GitHub repository with a Python package. To set up that repo, follow the instructions in the [publisher action](https://github.com/bitovi/github-actions-publish-github-pypi)\n\n## Basic Use\n\nFor basic usage, create `.github/workflows/publish-handler.yaml` with the following to handle the publish trigger:\n\n```yaml\nname: Handle PyPI Publish triggers\n\non:\n  workflow_dispatch:\n    inputs:\n      name:\n        description: 'Name of the package'\n        required: true\n      version:\n        description: 'Version of the package'\n        required: true\n      archive_url:\n        description: 'URL to the archive of the package'\n        required: true\n\njobs:\n  build-and-commit:\n    runs-on: ubuntu-latest\n\n    # Allows this action to create PRs\n    permissions:\n      pull-requests: write\n      contents: write\n\n    steps:\n      - name: Handle Python Package Publish\n        uses: bitovi/github-actions-publish-github-pypi-handler@main\n        with:\n          name: ${{ inputs.name }}\n          version: ${{ inputs.version }}\n          archive_url: ${{ inputs.archive_url }}\n          pypi_base_url: 'https://your-org.github.io/your-repo'\n```\n\n## Inputs\n\nThe following inputs can be used as `step.with` keys:\n\n| Name                               | Type    | Description                                                                            |\n|------------------------------------|---------|----------------------------------------------------------------------------------------|\n| `github-token`                     | String  | (Required) The GitHub token to use for triggering the publish workflow in the PyPI repository |\n| `checkout`                         | Boolean | (Optional) Whether to checkout the repository. Default is `true`                        |\n| `python-version`                   | String  | (Required) The Python version to use. Default is `3.8`                                  |\n| `name`                             | String  | (Required) Name of the package                                                          |\n| `version`                          | String  | (Required) Version of the package                                                       |\n| `archive_url`                      | String  | (Required) URL to the package archive                                                   |\n| `pypi_base_url`                    | String  | (Required) Base URL of the PyPI repository                                              |\n| `commit_branch`                    | String  | (Optional) Branch to commit the changes to. Default is `auto`                           |\n| `pypi_root_dir`                    | String  | (Optional) Root directory of the PyPI repository. Default is `pypi`                     |\n| `pypi-github-user-email`           | String  | (Optional) GitHub user email to use for committing the changes. Default is `github-actions[bot]@users.noreply.github.com` |\n| `pypi-github-user-name`            | String  | (Optional) GitHub user name to use for committing the changes. Default is `github-actions[bot]` |\n\n## Contributing\n\nWe would love for you to contribute to this action. [Issues](https://github.com/bitovi/github-actions-publish-github-pypi-handler/issues/new/choose) and Pull Requests are welcome!\n\n## License\n\nThe scripts and documentation in this project are released under the MIT License.\n\n# Provided by Bitovi\n\n[Bitovi](https://www.bitovi.com/) is a proud supporter of Open Source software.\n\n# We want to hear from you.\n\nCome chat with us about open source in our Bitovi community [Discord](https://discord.gg/J7ejFsZnJ4Z)!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fgithub-actions-publish-github-pypi-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitovi%2Fgithub-actions-publish-github-pypi-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fgithub-actions-publish-github-pypi-handler/lists"}