-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (53 loc) · 1.77 KB
/
release.yaml
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
name: Build specification and publish
# Upon publication of a GitHub release:
# 1. Convert the specification.MD to a PDF document
# 2. Upload it to the Zenodo deposit (https://zenodo.org/record/5084789)
#################################################################################
# A number of variables must be set for the jobs to work.
#
# - ZENODO_URL: - Zenodo URL to deposit release file to.
#
# - ZENODO_TOKEN: - Zenodo access token.
#
# - ZENODO_DEPOSIT_ID: - Deposit ID of previous Zenodo deposit.
###############################################################################
on:
release:
types: [published]
jobs:
build_pdf:
runs-on: ubuntu-latest
name: Build PDF
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Requirements
run: |
sudo apt install fonts-roboto
sudo fc-cache -f -v
sudo apt-get install texlive-xetex
sudo apt-get install pandoc
- name: Build
run: |
./build_specification/build_specification_pdf
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: pdf_specification
path: nifti_mrs_specification_*.pdf
upload_zenodo:
runs-on: ubuntu-latest
needs: build_pdf
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download result for build_pdf
uses: actions/download-artifact@v2
with:
name: pdf_specification
- name: Deposit
env:
ZENODO_URL: ${{ secrets.ZENODO_URL }}
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
ZENODO_DEPOSIT_ID: ${{ secrets.ZENODO_DEPOSIT_ID }}
run: ./.github/workflows/zenodo_deposit.sh "$ZENODO_URL" "$ZENODO_TOKEN" "$ZENODO_DEPOSIT_ID"