5  Creating a DOI and connecting it to GitHub

This chapter guides you through the process of creating a Digital Object Identifier (DOI) and connecting it to your GitHub repository.

5.1 Setting Up Your Repository on Zenodo

Begin by accessing your Zenodo account through your GitHub credentials. Once logged in, you’ll need to establish the connection between Zenodo and your GitHub repository. To do so, navigate to the settings by clicking the dropdown menu next to your email address in the top right corner and select “GitHub” from the options.

You’ll see a list of your GitHub repositories. Locate the repository you want to publish and activate it by flipping the switch to “ON”. Click on the repository link to access its settings. This connection allows Zenodo to track your repository’s releases and create corresponding archives.

5.1.1 Creating Your First Release

With the connection established, return to GitHub and create your initial release. Label it as version 0.0.1 and mark it as the “initial package release”. This triggers Zenodo to create an archive of your repository. Return to the Zenodo GitHub settings page to obtain your DOI badge, which you’ll need for documentation.

5.1.2 Configuring Your Zenodo Entry

Open your entry on Zenodo and click the “Edit” button. You’ll need to make several important modifications to ensure your package is properly categorized and accessible:

  1. Locate the “Additional Notes” section and replace any existing text with a link to your GitHub pages website.
  2. Adjust the upload type from “Software” to “Dataset” to properly categorize your submission. Under “Related identifiers”, remove the current release link entry and add your GitHub pages URL, specifying that it “is compiled/created by this upload” and categorizing it as a Dataset.

5.2 Documentation Updates in RStudio

After configuring Zenodo, switch to RStudio. Update the version number in your DESCRIPTION file so it matches the release. Then write the DOI into the citation files (CITATION.cff and inst/CITATION) and the README with one call, using the DOI shown on your Zenodo entry:

update_citation(doi = "10.5281/zenodo.11185699")

The function regenerates both citation files from DESCRIPTION, adds the DOI badge to README.Rmd, rebuilds README.md, and rebuilds the website in docs/ when it exists. Commit and push the changed files.

5.3 ETH Research Collection Submission

Note

This section applies only to GHE workflow submissions

For submissions to the ETH Research Collection, navigate to the research data section and select “dataset” as your submission type. Under organizational unit, select “tilley”, and set your license to “Creative Commons Attribution 4.0 International”. These settings ensure your submission aligns with institutional requirements and makes your data openly accessible while protecting your rights as the creator.