refactor(docs): visualisation-based updates [cd build] #32
This file contains 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-pypi | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
check_build_trigger: | |
name: Check build trigger | |
runs-on: ubuntu-latest | |
outputs: | |
build: ${{ steps.check_build_trigger.outputs.build }} | |
steps: | |
- name: Checkout scikit-longitudinal | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: check_build_trigger | |
name: Check build trigger | |
run: bash build_tools/github/check_build_trigger.sh | |
unit_testing: | |
runs-on: ubuntu-latest | |
needs: check_build_trigger | |
if: needs.check_build_trigger.outputs.build | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install uv & Python | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.5.11" | |
enable-cache: true | |
python-version: "cpython-3.9.21-linux-x86_64-gnu" | |
- name: Lock and Sync Dependencies | |
run: | | |
uv lock | |
uv sync --all-groups | |
- name: Run Unit Tests | |
run: | | |
uv run pytest -sv scikit_longitudinal | |
pypi-publish: | |
name: ☁️ Upload Release to PyPI | |
runs-on: ubuntu-latest | |
needs: [check_build_trigger, unit_testing] | |
if: | | |
always() && | |
needs.check_build_trigger.outputs.build && | |
needs.unit_testing.result == 'success' | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install uv & Python | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.5.11" | |
enable-cache: true | |
python-version: "cpython-3.9.21-linux-x86_64-gnu" | |
- name: Lock and Sync Dependencies | |
run: | | |
uv lock | |
uv sync --all-groups | |
- name: Build Distribution | |
run: | | |
uv build | |
- name: Publish to PyPI | |
env: | |
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
uv publish |