forgejo-action-wheel-packag.../action.yml

38 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2023-12-18 23:56:58 +01:00
---
name: Wheel Package Upload
description: Upload a python wheel package to a Forgejo/Gitea package registry
inputs:
wheel:
description: Path to the wheel package(s). Can contain shell glob expressions.
default: "dist/*.whl"
repository:
description: Forgejo/Gitea PyPI repository URL.
default: "${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/pypi"
username:
description: The username with which to authenticate against the repository.
default: forgejo-actions
password:
description: The password with which to authenticate against the repository.
default: "${GITHUB_TOKEN}"
runs:
using: docker
2023-12-19 02:47:03 +01:00
image: docker://docker.io/library/python:3.11-bookworm
2023-12-18 23:56:58 +01:00
entrypoint: /bin/bash
args:
- -c
- |
pip3 install --break-system-packages twine
cat > ~/.pypirc <<EOF
[distutils]
index-servers = forgejo
[forgejo]
repository = ${{ inputs.repository }}
username = ${{ inputs.username }}
password = ${{ inputs.password }}
EOF
python3 -m twine upload --repository forgejo ${{ inputs.wheel }}