Copy releases of software to ORDA
- Follow the instructions from Figshare to generate a personal access token.
- Follow these instructions from GitHub to store the value of the token with the name
FIGSHARE_TOKENin the repository from which you want to publish releases.
- Follow these instructions from Figshare to create an article on ORDA. Fill in the metadata, as appropriate, but do not upload any files. These will be automatically pushed from GitHub.
FIGSHARE_ARTICLE_ID is the integer that ends your ORDA DOI e.g. if your DOI is:
10.15131/shef.data.17113328
the FIGSHARE_ARTICLE_ID is:
17113328
- Create a file in your repository:
.github/workflows/ORDA.yamland populate it with theYAMLcode below.
name: Release to ORDA
on:
workflow_dispatch:
release:
types: [published]
jobs:
upload:
runs-on: ubuntu-latest
env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
steps:
- name: prepare-data-folder
run : mkdir 'data'
- name: download-archive
run: |
curl -sL "${{ github.event.release.zipball_url }}" > "$ARCHIVE_NAME".zip
curl -sL "${{ github.event.release.tarball_url }}" > "$ARCHIVE_NAME".tar.gz
- name: move-archive
run: |
mv "$ARCHIVE_NAME".zip data/
mv "$ARCHIVE_NAME".tar.gz data/
- name: upload-to-figshare
uses: figshare/github-upload-action@v1.1
with:
FIGSHARE_TOKEN: ${{ secrets.FIGSHARE_TOKEN }}
FIGSHARE_ENDPOINT: 'https://api.figshare.com/v2'
FIGSHARE_ARTICLE_ID: <<YOUR ARTICLE ID>>
DATA_DIR: 'data'
- Replace
<<YOUR ARTICLE ID>>with the Figshare article ID you identified in the previous step.
- Follow these instructions from GitHub to create a release. This will trigger a GitHub action which pushes the release (
.tar.gzand.zip) to ORDA.
Note that currently there is no system to ensure that the version number / code in the release tag matches the DOI version number.
To make a badge, add the following markdown to your readme. YOUR DOI VERSION NUMBER appears at the end of your DOI.
[](https://figshare.shef.ac.uk/articles/software/<<YOUR REPOSITORY NAME>>/<<YOUR ARTICLE ID>>/<<YOUR DOI VERSION NUMBER>>)
If you spot an error, or something that could be added or improved please raise an issue. If you'd like to propose a change that you can implement yourself, please make a pull request.