https://github.com/frequenz-floss/gh-action-build-python
Builds the source and binary distribution of a Python package
https://github.com/frequenz-floss/gh-action-build-python
action build distribution gh-action github github-action python wheel
Last synced: 23 days ago
JSON representation
Builds the source and binary distribution of a Python package
- Host: GitHub
- URL: https://github.com/frequenz-floss/gh-action-build-python
- Owner: frequenz-floss
- License: mit
- Created: 2024-02-23T12:34:11.000Z (over 2 years ago)
- Default Branch: v0.x.x
- Last Pushed: 2024-02-23T13:10:52.000Z (over 2 years ago)
- Last Synced: 2025-03-24T22:02:22.916Z (about 1 year ago)
- Topics: action, build, distribution, gh-action, github, github-action, python, wheel
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build Python Action
This action builds Python wheels and source distribution for a Python package.
Here is an example demonstrating how to use it in a workflow:
```yaml
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build wheels
uses: frequenz-floss/gh-action-build-python@v0.x.x
with:
python_version: "3.11"
```
## Inputs
* `python_version`: The Python version to use. Required.
This is passed to the `actions/setup-python` action.
* `outdir`: The directory where the built packages will be placed.
## Security
This action runs `python -I -m build`, which causes Python build tooling to
load and execute repository-controlled build configuration from the checked-out
repository.
Only use this action with trusted, already-merged code, such as workflows
triggered by `push` on protected branches or release tags. Do not use this
action with `pull_request_target`.
When you use this action, you are also trusting these external GitHub Actions:
* [`frequenz-floss/gh-action-setup-python-with-deps`][setup-python-with-deps],
which this action runs to install Python and the requested Python packages.
[setup-python-with-deps]: https://github.com/frequenz-floss/gh-action-setup-python-with-deps