forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 2.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Refresh Journal Lists
on:
# Allow to run manually
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Refresh Journal List Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: true
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 20
distribution: 'temurin'
cache: 'gradle'
- 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 abbreviation lists containing dots in them only (to be consistent)
rm journal_abbreviations_entrez.csv
rm journal_abbreviations_medicus.csv
rm journal_abbreviations_webofscience-dotless.csv
# we currently do not have good support for BibTeX strings
rm journal_abbreviations_ieee_strings.csv
# prepare building
mkdir -p $GITHUB_WORKSPACE/build/journals
cp * $GITHUB_WORKSPACE/build/journals/
# ensure that the .java classes are the most recent ones
mkdir -p $GITHUB_WORKSPACE/buildSrc/src/copied/java/org/jabref/logic/journals
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@v5
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-journallist
title: "[Bot] Update Journal abbrev list"
commit-message: Update journal abbrev list
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
if: github.ref != 'refs/heads/main'
with:
message: 'Update journal abbrev list'
committer_email: actions@github.com
fetch: false
push: true