Package
This job packages the Python source code as a source package (*.tar.gz
) and wheel package (*.whl
) and uploads it
as an artifact.
Behavior:
Checkout repository
Setup Python and install dependencies
Package Python sources:
If parameter
requirements
is empty, usebuild
package and runpython build
.If parameter
requirements
isno-isolation
, usebuild
package in no-isolation mode and runpython build
.If parameter
requirements
is non-empty, usesetuptools
package and runpython setup.py
.
Dependencies:
Instantiation
Simple Example
jobs:
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@r0
with:
artifact: Package
Complex Example
jobs:
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@r0
needs:
- Params
- Coverage
with:
python_version: ${{ needs.Params.outputs.python_version }}
requirements: -r build/requirements.txt
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
Parameters
python_version
Parameter Name |
Required |
Type |
Default |
---|---|---|---|
python_version |
optional |
string |
3.11 |
Python version.
requirements
Parameter Name |
Required |
Type |
Default |
---|---|---|---|
requirements |
optional |
string |
|
Python dependencies to be installed through pip; if empty, use pyproject.toml through build.
artifact
Parameter Name |
Required |
Type |
Default |
---|---|---|---|
artifact |
yes |
string |
— — — — |
Name of the package artifact.
Secrets
This job template needs no secrets.
Results
This job template has no output parameters.