Update package version #88
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
| # Workflow that runs on code changes after merge to main. | |
| name: Code changes | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - pyproject.toml | |
| jobs: | |
| Lint: | |
| uses: ./.github/workflows/reusable_lint.yaml | |
| Test: | |
| needs: Lint | |
| uses: ./.github/workflows/reusable_test.yaml | |
| with: | |
| full_suite: true | |
| upload_data: true | |
| deploy_docs: true | |
| secrets: inherit | |
| Publish: | |
| runs-on: ubuntu-latest | |
| needs: [Lint, Test] | |
| if: github.event.head_commit.message == 'Update package version' | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install package | |
| run: uv pip install -e .[dev] --system | |
| - name: Build package | |
| run: python -m build | |
| - name: Publish a Python distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI }} | |
| skip-existing: true |