feat: initial commit

This commit is contained in:
s3lph 2023-12-18 23:56:58 +01:00
commit 137f84ad0d
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5

37
action.yml Normal file
View file

@ -0,0 +1,37 @@
---
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
image: docker.io/library/python:3.11-bookworm
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 }}