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:
parent
b59074b4cc
commit
144f2aaa22
2 changed files with 30 additions and 0 deletions
8
.pypirc.template
Normal file
8
.pypirc.template
Normal 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
22
publish.sh
Executable 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!"
|
||||||
Loading…
Reference in a new issue