Merge branch 'master' of https://github.com/segrelab/cometspy #2
This file contains hidden or 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 Python 🐍 distribution 📦 to PyPI | ||
| on: | ||
| release: | ||
| types: [published] # Trigger on a new release being published | ||
| jobs: | ||
| build-and-publish: | ||
| runs-on: ubuntu-latest | ||
| environment: release # Optional: Define an environment for publishing | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13.0" # Specify your Python version | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install build twine | ||
| - name: Build distribution | ||
| run: python -m build | ||
| - name: Publish package to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 # Use the official PyPA action | ||
| with: | ||
| password: ${{ secrets.PYPI_API_TOKEN }} # Use a secret for your PyPI token | ||