FEALPy 3.0.2: Support for multiple tensor computing backends #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
release: | |
types: | |
- created # 只在 release 创建时触发 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '>=3.12' # 可以根据需要修改 Python 版本 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build distribution | |
run: | | |
python setup.py sdist bdist_wheel # 使用 setuptools 打包 | |
- name: Publish to PyPI | |
run: | | |
twine upload dist/* # 上传到 PyPI | |
env: | |
TWINE_USERNAME: __token__ # PyPI 推荐使用 '__token__' 作为用户名 | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # 使用 GitHub secret 里的 PyPI token | |