Update publish.yml #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 dea-intertidal to PyPI | |
| on: | |
| push: | |
| branches: [develop, uv_publish] | |
| paths: | |
| - 'pyproject.toml' | |
| - 'intertidal/**' | |
| - '.github/workflows/publish.yml' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out Git repository with full history | |
| # Required for `hatchling-vcs` to get correct version | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| version: "0.7.5" | |
| enable-cache: "true" | |
| # Setup Python environment with uv | |
| - name: Setup Python environment and install dea-tools | |
| run: uv sync | |
| # Package will be built using version automatically | |
| # generated from Git by `hatchling-vcs` | |
| - name: Build package | |
| run: uv build | |
| # Publish to PyPI | |
| - name: Publish package | |
| run: uv publish | |
| env: | |
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} |