Added automatic upload of tags to Zenodo.
Co-authored-by: Kaspar Emanuel <kaspar@monostable.co.uk>
This commit is contained in:
parent
8bd661a066
commit
a0788ac333
7 changed files with 252 additions and 0 deletions
|
|
@ -230,3 +230,26 @@ deploy:
|
|||
only:
|
||||
- tags
|
||||
- web
|
||||
|
||||
zenodo:
|
||||
stage: zenodo
|
||||
image: ubuntu:20.04
|
||||
before_script:
|
||||
- apt-get update -qq
|
||||
- apt-get -y -qq install git python3-pip
|
||||
- pip3 install -r scripts/zenodo/requirements.txt
|
||||
variables:
|
||||
ZENODO_USE_SANDBOX: "true"
|
||||
script:
|
||||
- git archive "${CI_COMMIT_REF_NAME}" --format=zip --output="${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-source.zip"
|
||||
- python3 scripts/zenodo/upload_to_zenodo.py "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-source.zip" dist/*
|
||||
artifacts:
|
||||
# this is only a small html link, let's just keep it forever
|
||||
# gitlab doesn't understand "expire_in: never" yet though
|
||||
expire_in: 100000 years
|
||||
name: zenodo-${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-link.html
|
||||
paths:
|
||||
- zenodo-link.html
|
||||
only:
|
||||
- tags
|
||||
- web
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue