feat: 新增一些参数 #2
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: Build and Publish Wheel | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rye | |
shell: bash | |
env: | |
RYE_INSTALL_OPTION: "--yes" | |
RYE_VERSION: 0.43.0 | |
run: | | |
curl -sSf https://rye.astral.sh/get | bash | |
echo "$HOME/.rye/shims" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
rye sync | |
. .venv/bin/activate | |
- name: Build Wheel | |
run: | | |
rye build --clean | |
- name: Upload Wheel as Release Asset | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: dist/*.* | |
- name: Publish package distributions to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository-url: https://test.pypi.org/legacy/ |