Publish Python Package to PyPI #1
Workflow file for this run
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 Package to PyPI | |
| on: | |
| release: | |
| types: [published] # This workflow runs when you publish a new GitHub release | |
| jobs: | |
| pypi-publish: | |
| name: Build and publish package to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi # This should match the environment name in your PyPI project settings | |
| url: https://pypi.org/p/SynapticSync # The URL to your project on PyPI | |
| permissions: | |
| id-token: write # This is required for trusted publishing | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" # Match this to your project's Python version | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Build package | |
| run: poetry build | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |