-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (39 loc) · 1.67 KB
/
preprint.yml
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
name: Preprint
on:
workflow_dispatch:
inputs:
repository_url:
description: 'URL of the repository containing the paper file'
required: true
branch:
description: 'Git branch where the paper Markdown file is'
required: false
issue_id:
description: 'The issue number of the submission in the JOSE reviews repo'
required: true
jobs:
latex-preprint-generation:
name: ${{ format('Preprint file for issue {0}', github.event.inputs.issue_id) }}
runs-on: ubuntu-latest
env:
GH_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_REPO: openjournals/jose-reviews
steps:
- name: Generate preprint file
id: generate-preprint
uses: xuanxu/preprint-action@main
with:
repository_url: ${{ github.event.inputs.repository_url }}
branch: ${{ github.event.inputs.branch }}
issue_id: ${{ github.event.inputs.issue_id }}
journal: jose
journal_template: jose
- name: Reply message
if: ${{ success() }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body ":page_facing_up: Preprint file created: [Find it here in the Artifacts list](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) :page_facing_up: "
- name: Error message
if: ${{ failure() }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body ":warning: [An error happened when generating the LaTeX preprint file](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true). ${{ env.CUSTOM_ERROR }}"