forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.87 KB
/
refresh-journal-lists.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Refresh Journal Lists
on:
workflow_dispatch:
# Allow to run manually
jobs:
publish:
name: Refresh Journal List Files
runs-on: ubuntu-latest
steps:
- name: Fetch all history for all tags and branches
uses: actions/checkout@v2
with:
ref: main
persist-credentials: false
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 14
- uses: actions/cache@v1
name: Restore gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Update journal lists
run: |
set +o pipefail
# prepare journal lists
cd /tmp
git clone --depth=1 https://github.com/JabRef/abbrv.jabref.org.git
cd abbrv.jabref.org/journals
# remove all lists without dot in them
# we use abbrevatiation lists containing dots in them only (to be consistent)
rm journal_abbreviations_entrez.csv
rm journal_abbreviations_medicus.csv
rm journal_abbreviations_webofscience-dots.csv
# prepare building
mkdir -p $GITHUB_WORKSPACE/build/journals
cp * $GITHUB_WORKSPACE/build/journals/
# ensure that the .java classes are the most recent ones
cp $GITHUB_WORKSPACE/src/main/java/org/jabref/logic/journals/* $GITHUB_WORKSPACE/buildSrc/src/copied/java/org/jabref/logic/journals
# create .mv file
cd $GITHUB_WORKSPACE
./gradlew generateJournalAbbreviationList
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-journallist
title: "[Bot] Update Journal abbrev list"
commit-message: Update journal abbrev list