This repository provides a template for integrating Zenodo with GitHub. It includes features such as file naming convention checks and Zenodo JSON validation to ensure proper metadata formatting for Zenodo uploads.
- Zenodo JSON Validation: Ensures that the
.zenodo.jsonfile adheres to the required schema for Zenodo metadata. - File Naming Convention Check: Verifies that files in the repository follow a predefined naming convention.
- CC-BY-4.0 License: The repository is licensed under the Creative Commons Attribution 4.0 International License.
.zenodo.json: Metadata file for Zenodo integration. This file includes information such as the dataset title, creators, description, license, and keywords.README.md: Documentation for the repository.LICENSE: Contains the full text of the CC-BY-4.0 license.- Other Files: Additional files related to the dataset or project.
To trigger this workflow, follow these steps:
- Make changes to the specified files or directories (e.g.,
data/**) in themainbranch. - Push the changes to the repository. The workflow will automatically run.
- Create a new branch and make changes to the specified files or directories (e.g.,
data/**). - Open a pull request targeting the
mainbranch. The workflow will run automatically when the pull request is opened, updated, or synchronized.
- Selective Triggering: The workflow only runs when relevant files are modified, optimizing resource usage.
- Code Review Integration: By using pull requests, you can ensure that changes are reviewed and tested before being merged into the
mainbranch. - Automation: Automates repetitive tasks, such as validation or testing, ensuring consistency and reducing manual effort.
-
Update
.zenodo.json:- Add your dataset metadata, including title, creators, description, and license.
- Example:
{ "upload_type": "dataset", "title": "Your Dataset Title", "creators": [ { "name": "Your Name", "affiliation": "Your Organization", "orcid": "Your ORCID" } ], "description": "A brief description of your dataset.", "access_right": "open", "license": "CC-BY-4.0", "keywords": ["example", "zenodo", "github"] }
-
Validate
.zenodo.json:- Use a JSON schema validator to ensure the file is correctly formatted.
-
Check File Naming Conventions:
- Ensure all files follow the required naming conventions for your project.
-
Publish to Zenodo:
- Once the repository is ready, push it to GitHub. Zenodo will automatically create a DOI for the release if integration is enabled.
This repository can include GitHub Actions workflows to automate tasks such as validating the .zenodo.json file or ensuring file naming conventions are followed. Example workflows might include:
- JSON Validation: A workflow that runs a JSON schema validator on
.zenodo.jsonto ensure it adheres to the required format. - Linting and Testing: A workflow that checks for code quality and runs tests.
To integrate Zenodo with GitHub and enable automatic DOI generation for your repository releases, follow these detailed steps:
- Log in to Zenodo at https://zenodo.org/ (or https://sandbox.zenodo.org/ for testing).
- Navigate to Account Settings by clicking your profile picture in the top-right corner.
- Under Applications, go to the GitHub tab and click Connect.
- Authorize Zenodo to access your GitHub account. This allows Zenodo to monitor your repositories and create DOIs for releases.
- In Zenodo, go to the GitHub tab under Account Settings.
- Locate the repository you want to integrate and toggle the switch to enable Zenodo integration.
- Zenodo will now monitor this repository for new releases.
- Add a
.zenodo.jsonfile to your repository with the required metadata. Example:{ "upload_type": "dataset", "title": "Example Dataset for Zenodo Sandbox Publishing", "creators": [ { "name": "Martin Schätz", "affiliation": "UCT Prague", "orcid": "0000-0003-0931-4017" } ], "description": "<p>This is an example dataset published to the Zenodo Sandbox via GitHub integration.</p>", "access_right": "open", "license": "CC-BY-4.0", "keywords": [ "example", "zenodo", "github", "sandbox" ] } - Validate the
.zenodo.jsonfile using a JSON schema validator to ensure it is correctly formatted.
- Go to your repository on GitHub.
- Click the Releases tab and then Draft a new release.
- Fill in the release details:
- Tag version: Specify a version number (e.g.,
v1.0.0). - Release title: Provide a title for the release.
- Description: Add a description of the release.
- Tag version: Specify a version number (e.g.,
- Attach any relevant files (e.g., datasets or documentation) if needed.
- Click Publish release.
- Zenodo will automatically archive the release and generate a DOI.
- You can view the DOI in your Zenodo account under the Uploads section.
- Check the DOI generated by Zenodo to ensure it is correct.
- Add the DOI badge to your repository's
README.mdfile for visibility. Example:[](https://doi.org/10.1234/example)
- Use Zenodo Sandbox for testing purposes. DOIs generated in the sandbox are not valid for production.
- Ensure the
.zenodo.jsonfile is updated before creating a release, as Zenodo uses it to populate metadata for the DOI.
{
"upload_type": "dataset",
"title": "Example Restricted Dataset from GitHub",
"creators": [
{
"name": "Your Organization Name",
"affiliation": "Your Organization"
}
],
"description": "<p>This is an example dataset published to Zenodo with restricted access initially.</p>",
"access_right": "restricted",
"license": "CC-BY-4.0",
"keywords": [
"example",
"zenodo",
"github",
"restricted"
],
"communities": [
{
"id": "zenodo-sandbox"
}
]
}for a closed access deposit:
{
"upload_type": "dataset",
"title": "Example Closed Dataset from GitHub",
"creators": [
{
"name": "Your Organization Name",
"affiliation": "Your Organization"
}
],
"description": "<p>This is an example dataset published to Zenodo with closed access initially.</p>",
"access_right": "closed",
"license": "CC-BY-4.0",
"keywords": [
"example",
"zenodo",
"github",
"closed"
],
"communities": [
{
"id": "zenodo-sandbox"
}
]
}for an embargoed access deposit:
{
"upload_type": "dataset",
"title": "Example Embargoed Dataset from GitHub",
"creators": [
{
"name": "Your Organization Name",
"affiliation": "Your Organization"
}
],
"description": "<p>This is an example dataset published to Zenodo with an embargo.</p>",
"access_right": "embargoed",
"embargo_date": "2026-01-01",
"license": "CC-BY-4.0",
"keywords": [
"example",
"zenodo",
"github",
"embargo"
],
"communities": [
{
"id": "zenodo-sandbox"
}
]
}This repository is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0). For more details, see the LICENSE file or visit https://creativecommons.org/licenses/by/4.0/.
Contributions are welcome! Please ensure that your changes adhere to the repository's guidelines and include proper documentation.
For questions or support, please contact the repository maintainer.