chore: add publish script and pypirc template

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
mrmamongo 2026-04-20 12:14:57 +03:00
parent b59074b4cc
commit 144f2aaa22
2 changed files with 30 additions and 0 deletions

8
.pypirc.template Normal file
View file

@ -0,0 +1,8 @@
[distutils]
index-servers =
ergpt
[ergpt]
repository = https://git.infra.er-gpt.ru/api/packages/pypi
username = __token__
password = YOUR_FORGEJO_API_TOKEN_HERE

22
publish.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
set -e
API_TOKEN="${FORGEJO_TOKEN:-$1}"
if [ -z "$API_TOKEN" ]; then
echo "Usage: $0 <api_token>"
echo "Or set FORGEJO_TOKEN environment variable"
exit 1
fi
echo "Building package..."
uv run python -m build
echo "Publishing to forgejo..."
uv run twine upload \
--repository-url https://git.infra.er-gpt.ru/api/packages/pypi \
--username __token__ \
--password "$API_TOKEN" \
dist/*
echo "Done!"