<!-- to build the image, go to https://mermaid.live/ and copy this code -->

flowchart TB
    subgraph GitLab
    G1(codemeta.json)
    end
    GitLab --> |New Release| GR{GitLab Runner}
    GR --> OSSR-CI
    GR --> |optional| UT(Unit tests)
    GR --> |optional| DC(Build Docker container)
    GR --> |optional| SI(Build Singularity Image)
    subgraph OSSR-CI
    R0(Get project release)
    R1(Convert codemeta.json to .zenodo.json)
    R2(Zip project repository)
    R3(Upload the zip archive to Zenodo)
    end
    OSSR-CI --> |publication| OSSR
    subgraph OSSR
    Z(New Record)
    end
