Skip to content

Commit

Permalink
Add workflow to release to Figshare on release
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-wild committed Nov 14, 2023
1 parent 282a225 commit de1b5b0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/figshare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release to Figshare
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: <<24427516>>
DATA_DIR: 'data'

0 comments on commit de1b5b0

Please sign in to comment.