📦 Publish tmam to PyPI #8
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 tmam to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*" # only run when a tag like v1.0.5 is pushed | |
| workflow_dispatch: # allow manual trigger from the Actions tab | |
| jobs: | |
| publish: | |
| name: Build & Publish to PyPI | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| run: | | |
| pip install --upgrade pip | |
| pip install poetry | |
| - name: Build package | |
| run: poetry build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.12.0 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| # repository-url: https://test.pypi.org/legacy/ # uncomment for TestPyPI |