Skip to content

pypi release

pypi release #13

Workflow file for this run

name: Build schemas
# when main changed rebuild the products (schemas and documentations) and updates the build folder
on:
push:
branches: [ main ]
permissions: write-all
jobs:
build-and-publish:
name: Build main branch
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9' ]
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Generate merged schemas
run: |
make merged_schemas
- name: Run schema_expander.py
run: |
poetry run python src/cell_annotation_schema/schema_expander.py expand -i build/general_schema.yaml -o build/general_schema.yaml
poetry run python src/cell_annotation_schema/schema_expander.py expand -i build/BICAN_schema.yaml -o build/BICAN_schema.yaml
poetry run python src/cell_annotation_schema/schema_expander.py expand -i build/CAP_schema.yaml -o build/CAP_schema.yaml
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git diff --quiet && git diff --staged --quiet || git commit -a -m "Main branch build"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.P_TOKEN }}
branch: ${{ github.head_ref }}