Skip to content

Commit df99ab2

Browse files
authored
Merge branch 'main' into feature/static-analysis-fixes
2 parents 6681865 + 2d7de46 commit df99ab2

File tree

135 files changed

+2989
-2354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2989
-2354
lines changed

.github/ghprcomment.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,20 @@
7979
If you made changes that are visible to the user, please add a brief description along with the issue number to the `CHANGELOG.md` file.
8080
If you did not, please replace the cross (`[x]`) by a slash (`[/]`) to indicate that no `CHANGELOG.md` entry is necessary.
8181
More details can be found in our [Developer Documentation about the changelog](https://devdocs.jabref.org/decisions/0007-human-readable-changelog.html).
82-
- jobName: CHANGELOG.md
82+
- jobName: 'CHANGELOG.md - only unreleased touched'
8383
message: >
8484
While the PR was in progress, a new version of JabRef has been released.
8585
8686
8787
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.
88+
- jobName: CHANGELOG.md
89+
message: >
90+
You modified `CHANGELOG.md` and did not meet JabRef's rules for consistently formatted Markdown files.
91+
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
92+
[Markdown lint's rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules) help to keep our Markdown files consistent within this repository and consistent with the Markdown files outside here.
93+
94+
95+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "CHANGELOG.md".
8896
- jobName: Markdown
8997
message: >
9098
You modified Markdown (`*.md`) files and did not meet JabRef's rules for consistently formatted Markdown files.

.github/workflows/binaries-ea.yml

Lines changed: 0 additions & 538 deletions
This file was deleted.

.github/workflows/binaries.yml

Lines changed: 33 additions & 162 deletions
Large diffs are not rendered by default.

.github/workflows/on-issue-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
assign:
9-
if: github.repository == 'JabRef/jabref'
9+
if: github.repository_owner == 'JabRef'
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read

.github/workflows/on-pr-closed.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
name: Determine issue number
1010
runs-on: ubuntu-latest
1111
if: >
12+
(github.repository == 'JabRef/jabref') &&
1213
!(
1314
(github.actor == 'dependabot[bot]') ||
1415
(

.github/workflows/on-pr-opened-updated.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
name: Determine issue number
1111
runs-on: ubuntu-latest
1212
if: >
13+
(github.repository == 'JabRef/jabref') &&
1314
!(
1415
(github.actor == 'dependabot[bot]') ||
1516
(
@@ -53,7 +54,6 @@ jobs:
5354
echo "No valid ticket number found!"
5455
exit 1
5556
move_issue:
56-
if: github.repository_owner == 'JabRef'
5757
name: Mark issue as in progress
5858
# after determine_issue_number to ensure that there is only one failure because of no ticket number
5959
needs: determine_issue_number
@@ -84,7 +84,6 @@ jobs:
8484
issue-number: ${{ needs.determine_issue_number.outputs.issue_number }}
8585
skip-if-not-in-project: true
8686
ensure_assignment:
87-
if: github.repository_owner == 'JabRef'
8887
name: Ensure that contributor is assigned (fails if not commented on issue)
8988
# after determine_issue_number to ensure that there is only one failure because of no ticket number
9089
needs: determine_issue_number
@@ -126,6 +125,7 @@ jobs:
126125
env:
127126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128127
conflicts_with_target:
128+
if: github.repository == 'JabRef/jabref'
129129
name: Conflicts with target branch
130130
runs-on: ubuntu-latest
131131
steps:
@@ -144,7 +144,7 @@ jobs:
144144
env:
145145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146146
upload-pr-number:
147-
if: ${{ github.repository == 'JabRef/jabref' }}
147+
if: github.repository == 'JabRef/jabref'
148148
runs-on: ubuntu-latest
149149
steps:
150150
- name: Create pr_number.txt

.github/workflows/on-pr-opened.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
welcome-first-time-contributor:
9+
if: github.repository == 'JabRef/jabref'
910
runs-on: ubuntu-latest
1011
permissions:
1112
issues: write

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ concurrency:
2525

2626
jobs:
2727
build:
28-
if: ${{ github.repository_owner == 'JabRef' }}
28+
if: github.repository == 'JabRef/jabref'
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout

.github/workflows/pr-comment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
echo "workflow_run_id=${{ github.event.workflow_run.id }}" >> $GITHUB_OUTPUT
7777
fi
7878
79-
- name: Check if PR has 'dev: no-bot-comments' label
79+
- name: "Check if PR has 'dev: no-bot-comments' label"
8080
if: ${{ github.event_name == 'workflow_dispatch' || (steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true') }}
8181
id: check-label
8282
run: |
@@ -89,7 +89,7 @@ jobs:
8989
# This step runs in both cases using the proper variables.
9090
- name: ghprcomment@main
9191
if: ${{ steps.check-label.outputs.has_label == 'false' && (github.event_name == 'workflow_dispatch' || (steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true')) }}
92-
uses: jbangdev/jbang-action@v0.126.2
92+
uses: jbangdev/jbang-action@v0.126.3
9393
with:
9494
script: https://github.com/koppor/ghprcomment/blob/main/ghprcomment.java
9595
scriptargs: "-r JabRef/jabref -p ${{ steps.set-vars.outputs.pr_number }} -w ${{ steps.set-vars.outputs.workflow_run_id }}"

.github/workflows/publish.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Publish to maven central
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/publish.yml
7+
push:
8+
paths:
9+
- .github/workflows/publish.yml
10+
tags:
11+
- '*'
12+
schedule:
13+
# run on each Monday
14+
- cron: '2 3 * * 1'
15+
workflow_dispatch:
16+
17+
permissions:
18+
actions: write
19+
contents: read
20+
pull-requests: write
21+
22+
env:
23+
GRADLE_OPTS: -Xmx4g -Dorg.gradle.vfs.watch=false
24+
JAVA_OPTS: -Xmx4g
25+
26+
concurrency:
27+
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ github.event_name }}"
28+
cancel-in-progress: true
29+
30+
jobs:
31+
publish:
32+
name: jablib
33+
if: github.repository == 'JabRef/jabref'
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Fetch all history for all tags and branches
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
submodules: 'true'
41+
show-progress: 'false'
42+
- name: Checkout java-module-packaging
43+
uses: actions/checkout@v4
44+
with:
45+
repository: koppor/java-module-packaging
46+
path: build-logic/java-module-packaging
47+
ref: fix-params
48+
- name: Install GitVersion
49+
uses: gittools/actions/gitversion/setup@v3.2.1
50+
with:
51+
versionSpec: "5.x"
52+
- name: Run GitVersion
53+
id: gitversion
54+
uses: gittools/actions/gitversion/execute@v3.2.1
55+
- name: Setup JDK
56+
uses: actions/setup-java@v4
57+
with:
58+
java-version: '24'
59+
distribution: 'corretto'
60+
java-package: 'jdk'
61+
- name: Setup Gradle
62+
uses: gradle/actions/setup-gradle@v4
63+
- name: Generate JBang cache key
64+
id: cache-key
65+
shell: bash
66+
run: |
67+
echo "cache_key=jbang-$(date +%F)" >> $GITHUB_OUTPUT
68+
- name: Use cache
69+
uses: actions/cache@v4
70+
with:
71+
lookup-only: true
72+
path: ~/.jbang
73+
key: ${{ steps.cache-key.outputs.cache_key }}
74+
restore-keys:
75+
jbang-
76+
- name: Setup JBang
77+
uses: jbangdev/setup-jbang@main
78+
79+
# region Publish JabLib on Maven Central
80+
- id: istagbuild
81+
run: |
82+
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
83+
echo "tagbuild=true" >> "$GITHUB_OUTPUT"
84+
else
85+
echo "tagbuild=false" >> "$GITHUB_OUTPUT"
86+
fi
87+
- name: Decode secretKeyRingFile
88+
id: secring
89+
uses: timheuer/base64-to-file@v1
90+
with:
91+
fileName: 'secring.gpg'
92+
encodedString: ${{ secrets.KOPPOR_SIGNING_SECRETKEYRINGFILE_BASE64 }}
93+
- name: store secrets
94+
run: |
95+
cat >> gradle.properties <<EOF
96+
signing.keyId=${{ secrets.KOPPOR_SIGNING_KEYID }}
97+
signing.password=${{ secrets.KOPPOR_SIGNING_PASSWORD }}
98+
signing.secretKeyRingFile=${{ steps.secring.outputs.filePath }}
99+
mavenCentralUsername=${{ secrets.KOPPOR_MAVENCENTRALUSERNAME }}
100+
mavenCentralPassword=${{ secrets.KOPPOR_MAVENCENTRALPASSWORD }}
101+
EOF
102+
grep secretKeyRingFile gradle.properties
103+
file ${{ steps.secring.outputs.filePath }}
104+
md5sum ${{ steps.secring.outputs.filePath }}
105+
- name: publishAllPublicationsToMavenCentralRepository
106+
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" -Ptagbuild="${{ steps.istagbuild.outputs.tagbuild }}" :jablib:publishAllPublicationsToMavenCentralRepository
107+
# endregion

0 commit comments

Comments
 (0)