CrossDown/.gitea/workflows/pypi.yaml
跨越晨昏 8a8422ea81
Some checks failed
Publish to PyPI on main branch update / build_and_publish (push) Has been cancelled
更新 .gitea/workflows/pypi.yaml
2024-11-02 13:53:25 +08:00

29 lines
694 B
YAML

name: Publish to PyPI on main branch update
on:
push:
branches:
- main
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # 指定你需要的Python版本
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
run: |
twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/*