zenodo-gha

A GitHub Action to create a release on Zenodo when a GitHub release is published.

https://github.com/nmfs-opensci/zenodo-gha

Science Score: 57.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
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

A GitHub Action to create a release on Zenodo when a GitHub release is published.

Basic Info
  • Host: GitHub
  • Owner: nmfs-opensci
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 141 KB
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 3
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation Zenodo

README.md

Zenodo Action

This is a variant of zenodo-release Copyright © 2022, Vanessa Sochat. This variant is focused specifically on creating a Zenodo release when a GitHub release is made so I moved some of set-up into action.yml because this is only triggered by GitHub releases.

This is a GitHub Action to allow you to automatically update a package on Zenodo when a GitHub release is created, and without needing to enable admin webhooks. To get this working you will need to:

  1. Log into Zenodo
  2. Under your name -> Applications -> Developer Applications -> Personal Access Tokens, create a new token and choose both scopes for deposit
  3. Add the token to your GitHub repository secrets as ZENODO_TOKEN. Settings > Secrets > Actions > Repository Secret
  4. Create a .zenodo.json file (or CITATION.cff) in the root of your repository (see template)
  5. Add the example GitHub Action below to your GitHub repository in the .github/workflows directory before your first release and use the 'New Release' instructions. Alternatively, create a release manually on Zenodo and use the 'Existing Release' instructions.

New Release (no DOI)

If you have no entry on Zenodo yet, then create a zenodo.yml file in the .github/workflows directory and copy this code into that file. Then make a GitHub release to trigger the GitHub Action. You can see if it worked by going to the Actions tab. Then go to Zenodo and look up what DOI it created. Copy the parent DOI (all versions DOI).

``` name: Zenodo Release

on: release: types: [published]

jobs: deploy: runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: Run Zenodo Deploy
  uses: nmfs-opensci/zenodo-gha@main
  with:
    token: ${{ secrets.ZENODO_TOKEN }}
    zenodo_json: .zenodo.json   # either a .zenodo.json file or CITATION.cff

```

Existing Release (has DOI on Zenodo)

Edit your zenodo.yml file and add the doi: line. Make sure it is the parent DOI or the "cite all versions by using the DOI". Now when you make releases, they will be added to the Zenodo record.

``` name: Zenodo Release

on: release: types: [published]

jobs: deploy: runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: Run Zenodo Deploy
  uses: nmfs-opensci/zenodo-gha@main
  with:
    token: ${{ secrets.ZENODO_TOKEN }}
    zenodo_json: .zenodo.json   # either a .zenodo.json file or CITATION.cff
    doi: 10.5281/zenodo.10811321 # update with your DOI

```

Customizing your Zenodo entry infomation

This is taken from the .zenodo.json or CITATION.cff file. You need to fill these in with the author infomation. CITATION.cff is the better option because it can be used more widely, but these files are finicky so definitely set up your CITATION file using a cff validator. They are available in Python and R (e.g. cffr in R). Do a Google search. Note the the cff version (in the cff file) is important for the validator as versions 1.1, 1.2 and 1.3 have different schema (schema = names for the entries like 'author', 'title', etc).

Troubleshooting Zenodo release fails

1) Go to Zenodo and make sure there is not a draft release. If there is, you will need to delete that. 2) Often a problem with the .zenodo.json file will cause failed releases. Go to the Actions tab, click on the failed action and look at the errors. 3) If you use CITAITON.cff to make the .zenodo.json file. If your CITATION.cff is not valid, then the Zenodo release will fail. Use a separate cff validator like cffr in R to check. cff files are very picky and it is easy to have validation issues.

Owner

  • Name: nmfs-opensci
  • Login: nmfs-opensci
  • Kind: organization

GiHub org for NMFS Open Science

Citation (CITATION.cff)

title: Required. Example super simple cff file.
abstract: Required. This is a description.
authors:
  - family-names: Doe
    given-names: Jane
cff-version: 1.2.0
message: Please cite the parent work rseng/zenodo-release

GitHub Events

Total
  • Watch event: 2
  • Push event: 1
Last Year
  • Watch event: 2
  • Push event: 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • eeholmes (1)
Pull Request Authors
  • eeholmes (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

action.yml actions
  • actions/checkout v3 composite