mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Added Sphinx based documentation.
(cherry picked from commit f9f5dd5117a14ba31a3a9113a1de2c12c624dffb)
This commit is contained in:
86
doc/JobTemplate/PublishOnPyPI.rst
Normal file
86
doc/JobTemplate/PublishOnPyPI.rst
Normal file
@@ -0,0 +1,86 @@
|
||||
PublishOnPyPI
|
||||
#############
|
||||
|
||||
Publish a source (``*.tar.gz``) and wheel (``*.whl``) packages to `PyPI <https://pypi.org/>`__.
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
|
||||
Simple Example
|
||||
==============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
# ...
|
||||
|
||||
PublishOnPyPI:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
with:
|
||||
artifact: Package
|
||||
secrets:
|
||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||
|
||||
Complex Example
|
||||
===============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
# ...
|
||||
|
||||
PublishOnPyPI:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
needs:
|
||||
- Params
|
||||
- Package
|
||||
with:
|
||||
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
|
||||
requirements: -r dist/requirements.txt
|
||||
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.Package }}
|
||||
secrets:
|
||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||
|
||||
Template Parameters
|
||||
*******************
|
||||
|
||||
python_version
|
||||
==============
|
||||
|
||||
Python version used for uploading the package contents via `twine` to PyPI.
|
||||
|
||||
**Default:** 3.11
|
||||
|
||||
requirements
|
||||
============
|
||||
|
||||
List of requirements to be installed for uploading the package contents to PyPI.
|
||||
|
||||
**Default:** wheel, twine
|
||||
|
||||
artifact
|
||||
========
|
||||
|
||||
Name of the artifact containing the package(s).
|
||||
|
||||
Secrets
|
||||
*******
|
||||
|
||||
PYPI_TOKEN
|
||||
==========
|
||||
|
||||
The token to access the package at PyPI for uploading new data.
|
||||
|
||||
Template Results
|
||||
****************
|
||||
|
||||
*None*
|
||||
|
||||
Dependencies
|
||||
************
|
||||
|
||||
* actions/download-artifact
|
||||
* actions/setup-python
|
||||
* geekyeggo/delete-artifact
|
||||
Reference in New Issue
Block a user