Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • v0.5 protected
  • v0.4 protected
  • v0.3 protected
  • v0.2 protected
  • v0.1 protected
6 results

publish-on-zenodo

  • Clone with SSH
  • Clone with HTTPS
  • Name Last commit Last update
    .gitattributes
    .gitlab-ci.yml
    .zenodo.json
    README.md

    Template for automatically publishing tagged versions of RADIOBLOCKS from Gitlab repositories to Zenodo.

    This uses the gitlab2zenodo Python package that is documented at https://gitlab.com/sbeniamine/gitlab2zenodo. However, the .gitlab-ci.yml file in the repository is different from the example given in the document in that it omits the -i $zenodo_record in the g2z-send command. This works around an issue with bootstrapping when you don't have a Zenodo record for your RADIOBLOCK yet.

    1. Connect to your Zenodo account (or create one if you do not have one yet). Note that you need to create a seperate account for the Zenodo sandbox.

    2. Create an API token on the Zenodo sandobox, checking deposit write and deposit publish as rights. Copy the string right away, it is shown only once. If you failed to do this, simply remove the token and create a new one.

    3. Create a zenodo_token custom variable in the Gitlab UI with the token as a value. This variable needs to be protected and masked to prevent leaking your API token.

    4. Configure v* as a protected wildcard tag in the Gitlab UI.

    5. Create a .zenodo.json file using the one found in this repository as template. Note that you can amend the metatdata later using the Zenodo web interface.

    6. Copy the .gitlab-ci.yml file into your repository, or extend the one already there using the one found in this repository as a template.

    7. Copy the .gitattributes file into your repository, or extend the one already there using the one found in this repository as a template.

    8. Tag your (local) repository with a version tag (i.e. v0.1).

    9. Push the tag to the remote with git push origin tag <tagname>.

    10. Go to Zenodo and publish (or discard) the newly created record.

    11. Create a zenodo_record custom variable in the Gitlab UI with the Zenodo record ID as a value. This variable does not need to be protected or masked.

    12. If you are done playing in the sandbox, remove the -s option from the g2z-send command in the .gitlab-ci.yml file. Generate an API token for the real Zenodo, and re-create the zenodo_token variable in the Gitlab UI. Remove the zenodo_record variable in the Gitlab UI. Then go through steps 8-11 again (but go to the real Zenodo) to publish.

    13. Request to make your Zenodo record part of the RADIOBLOCKS community.