Skip to content

Commit

Permalink
Merge pull request #247 from CITCOM-project/figshare_trigger
Browse files Browse the repository at this point in the history
Add workflow to release to Figshare on release
  • Loading branch information
christopher-wild authored Nov 15, 2023
2 parents 282a225 + de1b5b0 commit a5922d7
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/[email protected]
with:
FIGSHARE_TOKEN: ${{ secrets.FIGSHARE_TOKEN }}
FIGSHARE_ENDPOINT: 'https://api.figshare.com/v2'
FIGSHARE_ARTICLE_ID: <<24427516>>
DATA_DIR: 'data'

0 comments on commit a5922d7

Please sign in to comment.