Files
chendelian 36a411810d
All checks were successful
Publish Python Package to Gitea / publish (push) Successful in 25s
ci: publish formal version from pyproject.toml on main push
Remove .postN CI versioning, fix runtime version_ge for legacy post releases, and use ASCII issue separators in health output.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 09:26:41 +08:00

39 lines
1.3 KiB
YAML

name: Publish Python Package to Gitea
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
PIP_BREAK_SYSTEM_PACKAGES: "1"
PATH: /usr/local/bin:/usr/local/python3.12/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
PIP_EXTRA_INDEX_URL: https://mirrors.aliyun.com/pypi/simple https://mirrors.cloud.tencent.com/pypi/simple https://mirrors.huaweicloud.com/repository/pypi/simple
PIP_DEFAULT_TIMEOUT: "180"
PIP_TRUSTED_HOST: pypi.tuna.tsinghua.edu.cn mirrors.aliyun.com mirrors.cloud.tencent.com mirrors.huaweicloud.com files.pythonhosted.org pypi.org
steps:
- uses: https://git.jc2009.com/admin/actions-checkout@v4
- name: Install build tools
run: python3.12 -m pip install --upgrade build twine --break-system-packages
- name: Build distributions
run: python3.12 -m build
- name: Publish to Gitea Package Registry
env:
TWINE_USERNAME: admin
TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
run: |
python3.12 -m twine upload \
--repository-url https://git.jc2009.com/api/packages/client-jiangchang/pypi \
dist/*