Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into tryToCreateMergedTr…
Browse files Browse the repository at this point in the history
…ustStore

* upstream/main: (295 commits)
  Use OpenRewrite UseStringReplace (#10299)
  Add ReplaceStringBuilderWithString (#10302)
  Apply ShortenFullyQualifiedTypeReferences (#10301)
  Apply StaticMethodNotFinal (#10300)
  Apply exit early pattern (#10297)
  Avoid GH_TOKEN_UPDATE_GRADLE_WRAPPER at refresh-csl-subtrees
  Update snapcraft.yaml
  Fix exception when opening preferences (#10294)
  gnome-42-2204
  use gnome 4.2
  Use gnome
  Update base 22
  Add method for detecting journal abbrev delimiter (#10281)
  Update bug_report.yml
  Fix selection of table sort order (#10250)
  Fix mixup with YAML tags (#10287)
  More guards for upload (#10282)
  Reduced calls to Globals.prefs and Globals.entryTypesManager (#10177)
  Update jmh plugin (#10279)
  Add computer science to protected terms (#10222)
  ...
  • Loading branch information
Siedlerchr committed Sep 4, 2023
2 parents 41d3cc3 + 07f54ed commit 5370b7e
Show file tree
Hide file tree
Showing 364 changed files with 10,168 additions and 5,314 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ body:
attributes:
label: JabRef version
options:
- "5.9 (latest release)"
- "3.8.2"
- "5.10 (latest release)"
- Latest development branch build (please note build date below)
- Other (please describe below)
description: The version as shown in the about dialog.
Expand Down Expand Up @@ -42,7 +41,7 @@ body:

- type: checkboxes
attributes:
label: Checked with the latest development build
label: Checked with the latest development build (copy version output from About dialog)
description: |
Please always test if the bug is still reproducible in the latest development version. We are constantly improving JabRef and some bugs may already be fixed. If you already use a development version, ensure that you use the latest one.
You can download the latest development build at: https://builds.jabref.org/main/ . **Please make a backup of your library before you try out this version.**
Expand Down
46 changes: 17 additions & 29 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
name: Automerge Pull Requests
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
automerge:
name: Automerge Dependency Updates
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || contains(github.event.pull_request.labels.*.name, 'dependencies')
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: "WyriHaximus/[email protected]"
with:
ignoreActions: Automerge Dependabot,Code coverage,Create snapcraft image,Deploy binaries on builds.jabref.org,codecov/project,markdown-link-check
checkInterval: 13
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto approve
uses: hmarr/[email protected]
if: steps.waitforstatuschecks.outputs.status == 'success'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Merge pull requests
uses: pascalgn/[email protected]
if: steps.waitforstatuschecks.outputs.status == 'success'
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Merge PR
run: gh pr merge --auto "$PR_URL"
env:
MERGE_METHOD: "merge"
MERGE_LABELS: ""
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/cleanup_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
- name: Delete folder on builds.jabref.org
if: steps.checksecrets.outputs.secretspresent == 'YES'
uses: appleboy/ssh-action@v0.1.10
uses: appleboy/ssh-action@v1.0.0
with:
script: rm -rf /var/www/builds.jabref.org/www/pull/${{ github.event.pull_request.number }} || true
host: build-upload.jabref.org
Expand Down
57 changes: 30 additions & 27 deletions .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on:
inputs:
notarization:
type: boolean
required: false
default: false
required: true
default: true
push:
branches:
- arm64mac-release
- updateArm64Notarization

env:
SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }}
Expand All @@ -34,7 +35,6 @@ jobs:
- os: self-hosted
displayName: macOS (Arm64)
suffix: '_arm64'
archivePortable: tar -c -C build/distribution JabRef.app | pigz --rsyncable > build/distribution/JabRef-portable_macos_arm64.tar.gz && rm -R build/distribution/JabRef.app
runs-on: ${{ matrix.os }}
name: Create installer and portable version for ${{ matrix.displayName }}
steps:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
sed -i'.bak' -e "s/JavaLanguageVersion.of(20)/JavaLanguageVersion.of(21)/" build.gradle
- name: Clean up keychain
run: |
security delete-keychain signing_temp.keychain || true
security delete-keychain signing_temp.keychain ${{runner.temp}}/keychain/notarization.keychain || true
- name: Setup OSX key chain on OSX
uses: apple-actions/import-codesign-certs@v2
with:
Expand All @@ -92,8 +92,13 @@ jobs:
p12-password: ${{ secrets.OSX_CERT_PWD }}
create-keychain: false
keychain-password: jabref
- name: Create notarization keychain
run: |
mkdir ${{runner.temp}}/keychain
security create-keychain -p jabref ${{runner.temp}}/keychain/notarization.keychain
security set-keychain-settings ${{runner.temp}}/keychain/notarization.keychain
- name: Prepare merged jars and modules dir (macos)
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
- name: Build dmg (macos)
shell: bash
run: |
Expand Down Expand Up @@ -138,40 +143,38 @@ jobs:
--resource-dir buildres/mac \
--file-associations buildres/mac/bibtexAssociations.properties \
--jlink-options --bind-services
- name: Rename files
shell: pwsh
- name: Rename files with arm64 suffix as well
shell: bash
run: |
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"}
mv build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.dmg build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.dmg
mv build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.pkg build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.pkg
- name: Notarize dmg
if: (startsWith(github.ref, 'refs/tags/') || (${{ inputs.notarization }}))
shell: bash
run: |
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.dmg --keychain-profile "notarytool-profile" --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.dmg
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}" --keychain ${{runner.temp}}/keychain/notarization.keychain
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.dmg --keychain-profile "notarytool-profile" --keychain ${{runner.temp}}/keychain/notarization.keychain --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.dmg
- name: Notarize pkg
if: (startsWith(github.ref, 'refs/tags/') || (${{ inputs.notarization }}))
shell: bash
run: |
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.pkg --keychain-profile "notarytool-profile" --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.pkg
- name: Package application image
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}" --keychain ${{runner.temp}}/keychain/notarization.keychain
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.pkg --keychain-profile "notarytool-profile" --keychain ${{runner.temp}}/keychain/notarization.keychain --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-arm64.pkg
- name: Upload with rsync
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
shell: bash
run: ${{ matrix.archivePortable }}
run: |
mkdir ${{runner.temp}}/sshkey
if [[ -z "${{ secrets.buildJabRefPrivateKey }}" ]]; then
echo "buildJabRefPrivateKey is empty, exiting"
exit 1
fi
rsync -Pavz --itemize-changes --stats --partial-dir=/tmp/partial --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i ~/.ssh/id_rsa' build/distribution/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
- name: Upload to GitHub workflow artifacts store
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
uses: actions/upload-artifact@v3
with:
name: JabRef-${{ matrix.displayName }}
path: build/distribution
- name: Upload to builds.jabref.org (TODO - won't run on Mac, because Dockerized action)
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{ secrets.buildJabRefPrivateKey }}
with:
flags: -vaz --itemize-changes --stats --partial-dir=/tmp/partial --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync"
options: ''
ssh_options: '-p 9922'
src: 'build/distribution/'
dest: [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
27 changes: 17 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- 'docs/**'
- 'src/test/**'
- 'README.md'
merge_group:

env:
SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }}
Expand Down Expand Up @@ -54,7 +55,6 @@ jobs:
eaJDK: https://files.jabref.org/jdks/jdk-windows-x64.zip
- os: macos-latest
displayName: macOS
archivePortable: brew install pigz && tar -c -C build/distribution JabRef.app | pigz --rsyncable > build/distribution/JabRef-portable_macos.tar.gz && rm -R build/distribution/JabRef.app
eaJDK: https://files.jabref.org/jdks/jdk-macos-x64.tar.gz
runs-on: ${{ matrix.os }}
name: Create installer and portable version for ${{ matrix.displayName }}
Expand All @@ -74,6 +74,12 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pigz and cache (linux)
if: (matrix.os == 'ubuntu-latest')
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pigz
version: 1.0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
Expand Down Expand Up @@ -223,7 +229,7 @@ jobs:
rm debian-binary control.tar.* data.tar.*
mv -f jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}_amd64_repackaged.deb jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}_amd64.deb
- name: Upload to builds.jabref.org (ubuntu)
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') && (!startsWith(github.ref, 'refs/heads/gh-readonly-queue'))
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{ secrets.buildJabRefPrivateKey }}
Expand All @@ -234,13 +240,13 @@ jobs:
src: 'build/distribution/'
dest: [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
- name: Upload to GitHub workflow artifacts store (windows)
if: (matrix.os == 'windows-latest')
if: (matrix.os == 'windows-latest') && (!startsWith(github.ref, 'refs/heads/gh-readonly-queue'))
uses: actions/upload-artifact@v3
with:
name: JabRef-${{ matrix.displayName }}
path: build/distribution
- name: Upload to GitHub workflow artifacts store (macos)
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') && (!startsWith(github.ref, 'refs/heads/gh-readonly-queue'))
uses: actions/upload-artifact@v3
with:
# tbn = to-be-notarized
Expand Down Expand Up @@ -283,25 +289,25 @@ jobs:
name: JabRef-macOS-tbn
path: build/distribution/
- name: Notarize dmg
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ((startsWith(github.ref, 'refs/tags/') || (${{ inputs.notarization }}))
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)
shell: bash
run: |
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.dmg --keychain-profile "notarytool-profile" --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.dmg
- name: Notarize pkg
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ((startsWith(github.ref, 'refs/tags/') || (${{ inputs.notarization }}))
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)
shell: bash
run: |
xcrun notarytool store-credentials "notarytool-profile" --apple-id "[email protected]" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
xcrun notarytool submit build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.pkg --keychain-profile "notarytool-profile" --wait
xcrun stapler staple build/distribution/JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.pkg
- name: Package application image
if: (steps.checksecrets.outputs.secretspresent == 'YES')
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (matrix.os != 'macos-latest')
shell: bash
run: ${{ matrix.archivePortable }}
- name: Upload to GitHub workflow artifacts store
if: (steps.checksecrets.outputs.secretspresent == 'YES')
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (!startsWith(github.ref, 'refs/heads/gh-readonly-queue'))
uses: actions/upload-artifact@v3
with:
name: JabRef-macOS
Expand All @@ -312,6 +318,7 @@ jobs:
name: Upload binaries on builds.jabref.org
runs-on: ubuntu-latest
needs: [build, notarize]
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
steps:
- name: Check secrets presence
id: checksecrets
Expand Down Expand Up @@ -346,13 +353,13 @@ jobs:
name: JabRef-windows
path: build/distribution
- name: Get macOS binaries unsigned
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ! (${{ inputs.notarization }})) && ! (startsWith(github.ref, 'refs/tags/')
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (inputs.notarization == false && !startsWith(github.ref, 'refs/tags/'))
uses: actions/download-artifact@master
with:
name: JabRef-macOS-tbn
path: build/distribution/
- name: Get macOS binaries notarized
if: (steps.checksecrets.outputs.secretspresent == 'YES') && ((${{ inputs.notarization }})) || (startsWith(github.ref, 'refs/tags/'))
if: (steps.checksecrets.outputs.secretspresent == 'YES') && (inputs.notarization == true || startsWith(github.ref, 'refs/tags/'))
uses: actions/download-artifact@master
with:
name: JabRef-macOS
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/refresh-csl-subtrees.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ jobs:
publish:
name: Refresh Citation Style Language Files
runs-on: ubuntu-latest
if: github.repository == 'JabRef/jabref'
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
if: (github.repository == 'JabRef/jabref' || github.repository == 'koppor/jabref')
steps:
- name: Checkout source
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
persist-credentials: true
ref: main
fetch-depth: 0
- name: Initialize git
run: |
git checkout main
git config --local core.editor /usr/bin/cat
git config user.name "github actions"
git config user.email "jabrefmail+webfeedback@gmail.com"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Add csl-styles remote
run: git remote add -f csl-styles https://github.com/citation-style-language/styles.git
- name: Update csl-styles
Expand All @@ -48,8 +51,8 @@ jobs:
git commit -m"Refresh example styles" || true
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER }}
token: ${{ secrets.GITHUB_TOKEN }}
branch: refresh-csl
commit-message: Update CSL styles
title: "[Bot] Update CSL styles"
commit-message: Update CSL styles
labels: dependencies
9 changes: 0 additions & 9 deletions .github/workflows/refresh-journal-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,8 @@ jobs:
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 abbreviation lists"
commit-message: Update journal abbreviation lists
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
if: github.ref != 'refs/heads/main'
with:
message: 'Update journal abbreviation lists'
committer_email: [email protected]
fetch: false
push: true
9 changes: 9 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main-release
pull_request:
# always run on pull requests
merge_group:
workflow_dispatch:

env:
Expand Down Expand Up @@ -201,3 +202,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
# This ensures that no git merge conflict markers (<<<, ...) are contained
merge_conflict_job:
name: Find merge conflicts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Merge Conflict finder
uses: olivernybroe/[email protected]
Loading

0 comments on commit 5370b7e

Please sign in to comment.