forked from rseng/zenodo-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
79 lines (75 loc) · 2.27 KB
/
action.yml
File metadata and controls
79 lines (75 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Zenodo Release Action"
description: "Release zenodo metadata so you don't have to give admin hook access"
inputs:
archive:
description: the path to the release archive
required: true
token:
description: zenodo token
required: true
version:
description: the release version
required: true
zenodo_json:
description: Path to zenodo.json to upload with metadata (must exist)
doi:
descripton: The DOI to create a new version from
body:
descripton: The release description.
html_url:
descripton: The url to the release
outputs:
badge:
description: badge url
value: ${{ steps.deploy.outputs.badge }}
bucket:
description: bucket url
value: ${{ steps.deploy.outputs.bucket }}
conceptbadge:
description: concept badge url
value: ${{ steps.deploy.outputs.conceptbadge }}
conceptdoi:
description: concept doi url
value: ${{ steps.deploy.outputs.conceptdoi }}
doi:
description: doi url
value: ${{ steps.deploy.outputs.doi }}
latest:
description: latest url
value: ${{ steps.deploy.outputs.latest }}
latest_html:
description: latest html url
value: ${{ steps.deploy.outputs.latest_html }}
record:
description: record url
value: ${{ steps.deploy.outputs.record }}
record_html:
description: record html url
value: ${{ steps.deploy.outputs.record_html }}
runs:
using: "composite"
steps:
- name: Deploy Zenodo
id: deploy
env:
zenodo_json: ${{ inputs.zenodo_json }}
archive: ${{ inputs.archive }}
version: ${{ inputs.version }}
ACTION_PATH: ${{ github.action_path }}
ZENODO_TOKEN: ${{ inputs.token }}
doi: ${{ inputs.doi }}
body: test
html_url: ${{ github.event.release.html_url }}
run: |
pip install markdown
command="python ${{ github.action_path }}/scripts/deploy.py upload ${archive} --version ${version} --html-url ${html_url} --body ${body}"
if [[ "${doi}" != "" ]]; then
command="$command --doi ${doi}"
fi
if [[ "${zenodo_json}" != "" ]]; then
command="$command --zenodo-json ${zenodo_json}"
fi
echo '${{ github.event.release.body }}' > body.txt
printf "$command\n"
$command
shell: bash