release v31.1.0 #383
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
# This workflows will test the build of the Python package into a software | |
# distribution and a wheel, and if a tag is pushed, also upload it to PyPI. | |
# | |
name: Publish to PyPI | |
on: [push, pull_request] | |
jobs: | |
publish-to-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: pip install build | |
run: | | |
pip install build | |
pip list | |
- name: build --sdist --wheel . | |
run: | | |
python -m build --sdist --wheel . | |
ls -l dist | |
sha256sum dist/* | tee SHA256SUMS | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_api_token }} |