Update package version #120
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: | |
| workflow_dispatch: | |
| 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 sync --dev | |
| - name: Build package | |
| run: uv 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 |