diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index 3e05294..dfaa29b 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -17,11 +17,15 @@ jobs: with: doc: Documentation -# ArtifactCleanUp: -# uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0 -# needs: -# - BuildTheDocs -# - PublishToGitHubPages -# with: -# remaining: | -# Documentation + ArtifactCleanUp: + name: 🗑️ Artifact Cleanup + needs: + - BuildTheDocs + - PublishToGitHubPages + runs-on: ubuntu-latest + + steps: + - name: 🗑️ Delete artifacts + uses: geekyeggo/delete-artifact@v1 + with: + name: Documentation diff --git a/doc/JobTemplate/Parameters.rst b/doc/JobTemplate/Parameters.rst index 5636838..35aae7f 100644 --- a/doc/JobTemplate/Parameters.rst +++ b/doc/JobTemplate/Parameters.rst @@ -35,7 +35,7 @@ Complex Example The following instantiation example creates 3 jobs from the same template, but with differing input parameters. The first job `UnitTestingParams` might be used to create a job matrix of unit tests. It creates the cross of default systems (Windows, Ubuntu, MacOS, MinGW64) and the given list of Python versions including some mypy versions. In -addition a list of excludes (marked as :deletetion:`deletion`) and includes (marked as :additions:`additions`) is handed +addition a list of excludes (marked as :deletion:`deletions`) and includes (marked as :addition:`additions`) is handed over resulting in the following combinations: +---------+-------------+-------------+-------------+--------------+-------------------------+---------+----------+------------------------------+------------------------------+ diff --git a/doc/JobTemplate/PublishOnPyPI.rst b/doc/JobTemplate/PublishOnPyPI.rst index 05acf85..137a750 100644 --- a/doc/JobTemplate/PublishOnPyPI.rst +++ b/doc/JobTemplate/PublishOnPyPI.rst @@ -1,7 +1,22 @@ PublishOnPyPI ############# -Publish a source (``*.tar.gz``) and wheel (``*.whl``) packages to `PyPI `__. +Publish a source (``*.tar.gz``) package and/or wheel (``*.whl``) packages to `PyPI `__. + +**Behavior:** + +1. Download package artifact +2. Publish source package(s) (``*.tar.gz``) +3. Publish wheel package(s) (``*.whl``) +4. Delete the artifact + +**Preconditions:** + +A PyPI account was created and the package name is either not occupied or the user has access rights for that package. + +**Requirements:** + +Setup a secret (e.g. ``PYPI_TOKEN``) in GitHub to handover the PyPI token to the job. Instantiation ************* @@ -9,6 +24,9 @@ Instantiation Simple Example ============== +The following example demonstrates how to publish the artifact named ``Package`` to PyPI on every pipeline run triggered +by a Git tag. A secret is forwarded from GitHub secrets to a job secret. + .. code-block:: yaml jobs: @@ -25,10 +43,18 @@ Simple Example Complex Example =============== +In this more complex example, the job depends on a parameter creation (``Params``) and packaging job (``Package``). The +used Python version is overwritten by a parameter calculated in the ``Params`` jobs. Also the artifact name is managed +by that job. Finally, the list of requirements is overwritten to load a list of requirements from ``dist/requirements.txt``. + .. code-block:: yaml jobs: - # ... + Params: + # ... + + Package: + # ... PublishOnPyPI: uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0 @@ -43,8 +69,8 @@ Complex Example secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} -Template Parameters -******************* +Parameters +********** python_version ============== @@ -73,8 +99,8 @@ PYPI_TOKEN The token to access the package at PyPI for uploading new data. -Template Results -**************** +Results +******* *None* diff --git a/doc/JobTemplate/StaticTypeCheck.rst b/doc/JobTemplate/StaticTypeCheck.rst index 1da6930..49cd57e 100644 --- a/doc/JobTemplate/StaticTypeCheck.rst +++ b/doc/JobTemplate/StaticTypeCheck.rst @@ -1,31 +1,33 @@ StaticTypeCheck ############### -collect static type check result with `mypy`, and - optionally upload results as an HTML report. - Example `commands`: +collect static type check result with mypy, and optionally upload results as an HTML report. - 1. Regular package +Example ``commands``: + +1. Regular package + + .. code-block:: yaml - ```yml commands: mypy --html-report htmlmypy -p ToolName - ``` - 2. Parent namespace package - ```yml +2. Parent namespace package + + .. code-block:: yaml + commands: | touch Parent/__init__.py mypy --html-report htmlmypy -p ToolName - ``` - 3. Child namespace package +3. Child namespace package + + .. code-block:: yaml - ```yml commands: | cd Parent mypy --html-report ../htmlmypy -p ToolName - ``` + Instantiation ************* diff --git a/doc/index.rst b/doc/index.rst index 020e393..8cfc23d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -105,6 +105,7 @@ License Action/index Action/Releaser + Action/With-post-step .. raw:: latex