[pre-commit.ci] pre-commit autoupdate #30
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: Upload Packages | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
publish-python: | |
name: Publish Python package | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Rye | |
env: | |
RYE_INSTALL_OPTION: --yes | |
run: | | |
curl -sSf https://rye.astral.sh/get | bash | |
echo "$HOME/.rye/shims" >> $GITHUB_PATH | |
- name: Configure Rye | |
run: rye config --set-bool behavior.use-uv=true | |
- name: Build package | |
run: rye build | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 |