Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: actions-marketplace-validations
  • License: apache-2.0
  • Language: JavaScript
  • Default Branch: main
  • Size: 1020 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation Codeowners Codemeta Zenodo

README.md

Upload a GitHub release to Zenodo

This is a Github action to update your codemeta.json, CITATION.cff and .zenodo.json files with the release information and then upload your release to Zenodo.

This action uses the tag name of the release to update the version field in the metadata files. Be sure to use the correct tag name. Within your tag name a valid semver version should be present.

When update metadata files are added to your repository, the action will automatically send the new metadata files in its release. This will also mean that your Github release will not contain the updated metadata files. To avoid this, you can set the update_metadata_files option to false and add a .zenodo.json file.

Remember to remove the webhook from your repository before using this action. Otherwise, you will have two releases on Zenodo for every release on Github.

Currently the following files and fields will be updated:

* `codemeta.json`:
    * `version`: The release version
    * `identifier`: The release identifier (Zenodo version specific doi)

* `CITATION.cff`:
    * `version`: The release version
    * `identifiers`: The release identifier (Zenodo version specific doi).
    This action currently assumes your old zenodo doi is the first item in the list.

* `.zenodo.json`:
    * `version`: The release version

* `docs.compatibility.json`
    * A new entry will be added in this file. This entry is meant for versioned Docusaurus projects
        * `docsVersion` - The new docs version
        * `appVersion` - The latest app version

Inputs

A list of all inputs to the action is as follows:

github_token - Required - The GitHub token used to authenticate with GitHub. If not present, the action will attempt to read the token from the GITHUB_TOKEN environment variable.

zenodo_token - Required - The Zenodo token used to authenticate with Zenodo.

zenodo_deposition_id - Required - The Zenodo deposition ID to upload the release to.

zenodo_publish - Optional - Whether to publish the release. Defaults to false.

zenodo_sandbox - Optional - Whether to use the Zenodo sandbox. Defaults to false.

committer_name - Optional - The name of the committer.

committer_email - Optional - The email of the committer.

commit_message - Optional - The commit message. Defaults to chore: update ${file_name} for Zenodo release. You can use the ${file_name} variable to refer to the metdata file name in the commit message.

update_metadata_files - Optional - Whether to update the metadata files. Defaults to true. This will also push the changes to GitHub.

codemeta_json - Optional - Whether a codemeta.json file exists in the repository and needs to be updated for the new release. Defaults to false.

citation_cff - Optional - Whether a CITATION.cff file exists in the repository and needs to be updated for the new release. Defaults to false.

zenodo_json - Optional - Whether a .zenodo.json file exists in the repository and needs to be updated for the new release. Defaults to false.

docs_compatibility_json - Optional - Whether a docs.compatibility.json file exists in the repository and needs to be updated for the new release. Defaults to false.

Outputs

doi - The Zenodo DOI of the release.

version - The version of the release.

Example usage

A sample action is shown below.

```yaml name: Release on Zenodo

on: release: types: [published]

jobs: upload-to-zenodo: runs-on: ubuntu-latest name: A job to update metadata and push a release to Zenodo

steps:
  # This step is not needed at the moment but might decide to add on more steps in the future
  - name: Set up Node.js
    uses: actions/setup-node@v3
    with:
      node-version: 16

  - name: Upload to Zenodo
    id: release
    uses: megasanjay/upload-to-zenodo@v2.0.1
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      zenodo_token: ${{ secrets.ZENODO_TOKEN }}
      zenodo_deposition_id: SOME_DEPOSITION_ID
      zenodo_publish: true
      zenodo_sandbox: false
      commit_message: 'chore: update ${file_name} for Zenodo release'
      update_metadata_files: true
      codemeta_json: true
      citation_cff: true
      zenodo_json: true

  # Get the doi from the `release` step
  - name: Get the output doi
    run: echo "The released doi was ${{ steps.release.outputs.doi }}"

```

Build and release instructions

To build and release a new version of the action, run the following commands:

```sh npm install npm run build

git commit -a -m "chore: release action v1.2.3" git tag -a -m "Action v1.2.3 release" v1.2.3 git push --follow-tags ```

Owner

  • Name: actions-marketplace-validations
  • Login: actions-marketplace-validations
  • Kind: organization

Temporarily holds mirrors of GitHub Actions from the marketplace

Citation (CITATION.cff)

abstract: A GitHub action to automatically push a release to Zenodo
authors:
  - affiliation: FAIR Data Innovations Hub
    email: ssoundarajan@calmi2.org
    family-names: Soundarajan
    given-names: Sanjay
cff-version: 1.2.0
date-released: '2022-08-30'
keywords:
  - GitHub
license: Apache-2.0
message: If you use this software, please cite it as below.
repository-code: https://github.com/megasanjay/upload-to-zenodo
title: Upload to Zenodo
type: software
version: 2.0.1
identifiers:
  - description: DOI for this application's record on Zenodo
    type: doi
    value: https://doi.org/10.5281/zenodo.7036310

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "license": "https://spdx.org/licenses/Apache-2.0",
  "codeRepository": "https://github.com/megasanjay/upload-to-zenodo",
  "dateCreated": "2022-06-07",
  "datePublished": "2022-06-07",
  "dateModified": "2022-08-30",
  "issueTracker": "https://github.com/megasanjay/upload-to-zenodo/issues",
  "name": "Upload to Zenodo",
  "version": "2.0.1",
  "description": "A GitHub action to automatically push a release to Zenodo",
  "applicationCategory": "Scientific",
  "keywords": [
    "GitHub"
  ],
  "programmingLanguage": [
    "JavaScript"
  ],
  "operatingSystem": [
    "Windows 11",
    "Big Sur (macOS 11)",
    "Ubuntu"
  ],
  "author": [
    {
      "@type": "Person",
      "givenName": "Sanjay",
      "familyName": "Soundarajan",
      "email": "ssoundarajan@calmi2.org",
      "affiliation": {
        "@type": "Organization",
        "name": "FAIR Data Innovations Hub"
      }
    }
  ],
  "identifier": "https://doi.org/10.5281/zenodo.7036310"
}

GitHub Events

Total
Last Year