{"id":45357614,"url":"https://github.com/rseng/zenodo-release","last_synced_at":"2026-02-21T13:14:48.660Z","repository":{"id":43319649,"uuid":"465971244","full_name":"rseng/zenodo-release","owner":"rseng","description":"Automated releases to zenodo without granting admin access to webhooks","archived":false,"fork":false,"pushed_at":"2024-12-04T01:53:28.000Z","size":57,"stargazers_count":10,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-04T02:35:51.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rseng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-04T03:37:38.000Z","updated_at":"2024-12-04T01:53:32.000Z","dependencies_parsed_at":"2024-12-04T02:32:16.204Z","dependency_job_id":"85366358-9e07-4aca-ac7d-cf1db402eceb","html_url":"https://github.com/rseng/zenodo-release","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rseng/zenodo-release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rseng%2Fzenodo-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rseng%2Fzenodo-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rseng%2Fzenodo-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rseng%2Fzenodo-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rseng","download_url":"https://codeload.github.com/rseng/zenodo-release/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rseng%2Fzenodo-release/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29681488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T12:30:22.644Z","status":"ssl_error","status_checked_at":"2026-02-21T12:29:55.402Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-21T13:14:48.234Z","updated_at":"2026-02-21T13:14:48.649Z","avatar_url":"https://github.com/rseng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zenodo Action\n\nThis is a quick helper action to allow you to automatically update a package on zenodo\non release, and without needing to enable admin webhooks. To get this working you will need to:\n\n1. Create an account on Zenodo\n2. Under your name -\u003e Applications -\u003e Developer Applications -\u003e Personal Access Tokens -\u003e +New Token and choose both scopes for deposit\n3. Add the token to your repository secrets as `ZENODO_TOKEN`\n4. Create a .zenodo.json file for the root of your repository (see [template](.zenodo.json))\n5. Add the example action (modified for your release) to your GitHub repository.\n\n[Here is an example](https://doi.org/10.5281/zenodo.6326822) of an \"all releases\" DOI created by this action, and the metadata associated:\n\n```console\ndoi https://doi.org/10.5281/zenodo.6326823\nconceptdoi https://doi.org/10.5281/zenodo.6326822\nconceptbadge https://zenodo.org/badge/doi/10.5281/zenodo.6326822.svg\nbadge https://zenodo.org/badge/doi/10.5281/zenodo.6326823.svg\nbucket https://zenodo.org/api/files/dbcddadd-4ea9-4f66-8045-e15552399dbc\nlatest https://zenodo.org/api/records/6326823\nlatest html https://zenodo.org/record/6326823\nrecord https://zenodo.org/api/records/6326823\nrecord html https://zenodo.org/record/6326823\n```\n \nYou'll notice for this release there are several associated DOIs, and what this means is that the DOI [https://doi.org/10.5281/zenodo.6326822](https://doi.org/10.5281/zenodo.6326822)\nwill always link to the latest, which is typically what we want.\n\n**Important** You CANNOT create a release online first and then try to upload to the same DOI.\nIf you do this, you'll get:\n\n```python\n{'status': 400,\n 'message': 'Validation error.',\n 'errors': [{'field': 'metadata.doi',\n   'message': 'The prefix 10.5281 is administrated locally.'}]}\n```\n\nI think this is kind of silly, but that's just me. So the way to go is likely to:\n\n1. Create a new DOI on the first go when you don't have one\n2. Add the \"all releases\" DOI to your action to update that one for all releases after that!\n\n## Usage\n\nWhen looking at artifacts in Zenodo you'll see a versions card like the image below.  This artifact has\nonly one version, 0.0.15. By default, this is the behavior of this action - to create brand new artifacts\nwith only one version.\n\nIf, however, you'd like to make new versions you can specify the doi that represents *all*\nversions. In this image you would specify `10.5281/zenodo.6326822`.  This action will then\ncreate new versions tied to this DOI.\n\n![Zenodo card for versions. '0.0.15' is the only version and a DOI of 10.5281/zenodo.6326823. The footer of the card has a site all versions with DOI 10.5281/zenodo.6326822](img/zenodo_versions.png)\n\n### GitHub Action\n\nAfter you complete the steps above to create the metadata file, you have two options.\n\n#### Existing DOI\n\nIf you have an existing DOI that is of the **all versions** type meaning we can update it, you should provide it to the action.\nThe example below shows running a release workflow and providing an archive to update to a new version (**released under the same DOI**)\n\n```yaml\nname: Zenodo Release\n\non:\n  release:\n    types: [published]\n\njobs:\n  deploy:\n    runs-on: ubuntu-20.04\n\n    steps:\n    - uses: actions/checkout@v3\n    - name: download archive to runner\n      env:\n        tarball: ${{ github.event.release.tarball_url }}\n        zipball: ${{ github.event.release.zipball_url }}\n      # add the suffix to the name of the file so type is recognized when downloading from Zenodo\n      # .tar.gz for tarball and .zip for zipball\n      # Archiving the zipball will cause Zenodo to show a preview of the contents of the zipball while using tarball will not.\n      run: |\n        name=$(basename ${zipball}).zip  \n        curl -L $zipball \u003e $name\n        echo \"archive=${name}\" \u003e\u003e $GITHUB_ENV\n\n    - name: Run Zenodo Deploy\n      uses: rseng/zenodo-release@main\n      with:\n        token: ${{ secrets.ZENODO_TOKEN }}\n        version: ${{ github.event.release.tag_name }}\n        zenodo_json: .zenodo.json   # optional\n        html_url: ${{ github.event.release.html_url }} # optional to include link to the GitHub release\n        archive: ${{ env.archive }}\n        title: ${{ github.repository }}:${{ github.event.release.tag_name }}  # optional title to override\n        description: \u003ch1\u003e${{ github.event.release.tag_name }}\u003c/h1\u003e  # optional release description (allows HTML)\n\n        # Optional DOI for all versions. Leaving this blank (the default) will create\n        # a new DOI on every release. Use a DOI that represents all versions will\n        # create a new version for this existing DOI.\n        #\n        # Newer versions have their own DOIs, but they're also linked to this DOI\n        # as a different version. When using this, use the DOI for all versions.\n        doi: '10.5281/zenodo.6326822'\n```\n\nNotice how we are choosing to use the .tar.gz (you could use the zip too at `${{ github.event.release.zipball_url }}`).\nNote that the \"zenodo.json\" is optional only if you've already created the record with some metadata. If you provide it,\nit will be used to update metadata found with the previous upload. If you don't provide it, the previous upload will\nonly be updated for the date and version. Note that we are considering adding an ability to upload from new authors found\nin the commit history, but this is not implemented yet.\n\n#### New DOI\n\nIf you want to be creating fresh DOIs and releases (with no shared DOI for all versions) for each one, just remove the doi variable. Note\nthat for this case, the .zenodo.json is required as there isn't a previous record to get it from.\n\n```yaml\nname: Zenodo Release\n\non:\n  release:\n    types: [published]\n\njobs:\n  deploy:\n    runs-on: ubuntu-20.04\n\n    steps:\n    - uses: actions/checkout@v3\n    - name: download archive to runner\n      env:\n        tarball: ${{ github.event.release.tarball_url }}\n      run: |\n        name=$(basename ${tarball})        \n        curl -L $tarball \u003e $name\n        echo \"archive=${name}\" \u003e\u003e $GITHUB_ENV\n\n    - name: Run Zenodo Deploy\n      uses: rseng/zenodo-release@main\n      with:\n        token: ${{ secrets.ZENODO_TOKEN }}\n        version: ${{ github.event.release.tag_name }}\n        zenodo_json: .zenodo.json  # required\n        archive: ${{ env.archive }}\n```\n\n#### Archives\n\nFor both of the above, instead of an exact archive path you can also use a pattern to give to Python's `glob.glob`. E.g.,:\n\n```yaml\n      with:\n        archive: \"files/*.tar.gz\"\n```\n\nNote that we will be testing support for more than one path or pattern soon.\nWe also grab the version as the release tag. We are also running on the publication of a release.\n\n#### Outputs\n\nIf you want to see or do something with the outputs, add an `id` to the deploy step and do:\n\n```yaml\n    - name: Run Zenodo Deploy\n      id: deploy\n      uses: rseng/zenodo-release@main\n      with:\n        token: ${{ secrets.ZENODO_TOKEN }}\n        version: ${{ github.event.release.tag_name }}\n        zenodo_json: .zenodo.json\n        archive: ${{ env.archive }}\n\n    - name: View Outputs\n      env:\n        doi: ${{ steps.deploy.outputs.doi }} \n        conceptdoi: ${{ steps.deploy.outputs.conceptdoi }} \n        conceptbadge: ${{ steps.deploy.outputs.conceptbadge }} \n        badge: ${{ steps.deploy.outputs.badge }} \n        bucket: ${{ steps.deploy.outputs.bucket }} \n        latest: ${{ steps.deploy.outputs.latest }} \n        latest_html: ${{ steps.deploy.outputs.latest_html }} \n        record: ${{ steps.deploy.outputs.record }} \n        record_html: ${{ steps.deploy.outputs.record_html }} \n      run: |\n        echo \"doi ${doi}\"\n        echo \"conceptdoi ${conceptdoi}\"\n        echo \"conceptbadge ${conceptbadge}\"\n        echo \"badge ${badge}\"\n        echo \"bucket ${bucket}\"\n        echo \"latest ${latest}\"\n        echo \"latest html ${latest_html}\"\n        echo \"record ${record}\"\n        echo \"record html ${record_html}\"\n```\n\n### Local\n\nIf you want to use the script locally (meaning to manually push a release) you can wget\nor download the release (usually .tar.gz or .zip) and then export your zenodo token and do\nthe following:\n\n```bash\nexport ZENODO_TOKEN=xxxxxxxxxxxxxxxxxxxx\n\n                                  # archive    # multi-version DOI                 # new version\n$ python scripts/deploy.py upload 0.0.0.tar.gz --doi 10.5281/zenodo.6326822        --version 0.0.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frseng%2Fzenodo-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frseng%2Fzenodo-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frseng%2Fzenodo-release/lists"}