lightning/.github/actions/pkg-publish/action.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
YAML
Raw Permalink Normal View History

name: Publish package
description: publishing whl and src to PyPI
inputs:
pkg-folder:
description: define folder with packages
required: true
2022-12-01 20:12:15 +00:00
pypi-test-token:
description: login token for PyPI
default: ""
2022-12-01 20:12:15 +00:00
required: false
pypi-token:
description: login token for PyPI
default: ""
2022-12-01 20:12:15 +00:00
required: false
runs:
using: "composite"
steps:
- run: ls -lh ${{ inputs.pkg-folder }}
shell: bash
# 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
- 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