File tree Expand file tree Collapse file tree 2 files changed +24
-13
lines changed Expand file tree Collapse file tree 2 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 11name : Publish to maven central
22
33on :
4- pull_request :
4+ # On releases
55 push :
6- branches :
7- - main
86 tags :
97 - ' **'
10- schedule :
11- # Run on each Monday
12- # Additional run in addition to the other events, because some resources could have changes
13- - cron : ' 2 3 * * 1'
8+
9+ # Called by the JBang testing jobs to ensure that SNAPSHOT is uptodate
10+ workflow_call :
11+ secrets :
12+ KOPPOR_SIGNING_SECRETKEYRINGFILE_BASE64 :
13+ required : true
14+
1415 workflow_dispatch :
1516 inputs :
1617 tagbuild :
1920 default : false
2021 type : boolean
2122
23+ # Additional run in addition to the other events, because some resources could have changes
24+ schedule :
25+ # Run on each Monday
26+ - cron : ' 2 3 * * 1'
27+
2228permissions :
2329 actions : write
2430 contents : read
5662 github.event_name == 'schedule' ||
5763 github.event_name == 'workflow_dispatch' ||
5864 (needs.detect_changes.outputs.changed == 'true' &&
59- ((github.event_name == 'push' && github.repository == 'JabRef/jabref') ||
65+ ((github.event_name == 'workflow_call' && github.repository == 'JabRef/jabref') ||
66+ (github.event_name == 'push' && github.repository == 'JabRef/jabref') ||
6067 (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'JabRef/jabref'))
6168 )
6269 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 88 pull_request :
99 merge_group :
1010 workflow_dispatch :
11- # Re-run JBang tests after the SNAPSHOT is updated
12- workflow_run :
13- workflows : ["Publish to maven central"]
14- types :
15- - completed
11+
1612env :
1713 AstrophysicsDataSystemAPIKey : ${{ secrets.AstrophysicsDataSystemAPIKey_FOR_TESTS }}
1814 BiodiversityHeritageApiKey : ${{ secrets.BiodiversityHeritageApiKey_FOR_TESTS}}
@@ -400,9 +396,16 @@ jobs:
400396 CI : " true"
401397 DBMS : " postgresql"
402398
399+ publish :
400+ if : github.ref == 'refs/heads/main'
401+ uses : ./.github/workflows/publish.yml
402+ secrets :
403+ KOPPOR_SIGNING_SECRETKEYRINGFILE_BASE64 : ${{ secrets.KOPPOR_SIGNING_SECRETKEYRINGFILE_BASE64 }}
404+
403405 jbang :
404406 name : JBang (main)
405407 runs-on : ubuntu-latest
408+ needs : publish
406409 if : github.ref == 'refs/heads/main'
407410 steps :
408411 - name : Checkout source
@@ -438,6 +441,7 @@ jobs:
438441 jbang-pr :
439442 name : JBang (PR)
440443 runs-on : ubuntu-latest
444+ # does not need publish, because the JBang scripts are modified
441445 if : github.ref != 'refs/heads/main'
442446 strategy :
443447 fail-fast : false
You can’t perform that action at this time.
0 commit comments