2022-10-21 19:00:02 +00:00
|
|
|
name: Publish package
|
|
|
|
description: publishing whl and src to PyPI
|
|
|
|
|
|
|
|
inputs:
|
2022-12-13 05:55:39 +00:00
|
|
|
pkg-folder:
|
|
|
|
description: define folder with packages
|
2022-10-21 19:00:02 +00:00
|
|
|
required: true
|
2022-12-01 20:12:15 +00:00
|
|
|
pypi-test-token:
|
|
|
|
description: login token for PyPI
|
2023-09-25 12:34:41 +00:00
|
|
|
default: ""
|
2022-12-01 20:12:15 +00:00
|
|
|
required: false
|
2022-10-21 19:00:02 +00:00
|
|
|
pypi-token:
|
|
|
|
description: login token for PyPI
|
2023-09-25 12:34:41 +00:00
|
|
|
default: ""
|
2022-12-01 20:12:15 +00:00
|
|
|
required: false
|
2022-10-21 19:00:02 +00:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2023-09-25 12:34:41 +00:00
|
|
|
- run: ls -lh ${{ inputs.pkg-folder }}
|
|
|
|
shell: bash
|
2022-10-21 19:00:02 +00:00
|
|
|
|
2023-09-25 12:34:41 +00:00
|
|
|
# We do this, since failures on test.pypi aren't that bad
|
|
|
|
- name: Publish to Test PyPI
|
|
|
|
uses: pypa/gh-action-pypi-publish@v1.5.1
|
|
|
|
if: inputs.pypi-test-token != ''
|
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
password: ${{ inputs.pypi-test-token }}
|
|
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
packages_dir: ${{ inputs.pkg-folder }}
|
|
|
|
verbose: true
|
2022-10-21 19:00:02 +00:00
|
|
|
|
2023-09-25 12:34:41 +00:00
|
|
|
- name: Publish distribution 📦 to PyPI
|
|
|
|
uses: pypa/gh-action-pypi-publish@v1.5.1
|
|
|
|
if: inputs.pypi-token != ''
|
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
password: ${{ inputs.pypi-token }}
|
|
|
|
packages_dir: ${{ inputs.pkg-folder }}
|
|
|
|
verbose: true
|