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 1
1
name : Publish to maven central
2
2
3
3
on :
4
- pull_request :
4
+ # On releases
5
5
push :
6
- branches :
7
- - main
8
6
tags :
9
7
- ' **'
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
+
14
15
workflow_dispatch :
15
16
inputs :
16
17
tagbuild :
19
20
default : false
20
21
type : boolean
21
22
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
+
22
28
permissions :
23
29
actions : write
24
30
contents : read
56
62
github.event_name == 'schedule' ||
57
63
github.event_name == 'workflow_dispatch' ||
58
64
(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') ||
60
67
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'JabRef/jabref'))
61
68
)
62
69
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 8
8
pull_request :
9
9
merge_group :
10
10
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
+
16
12
env :
17
13
AstrophysicsDataSystemAPIKey : ${{ secrets.AstrophysicsDataSystemAPIKey_FOR_TESTS }}
18
14
BiodiversityHeritageApiKey : ${{ secrets.BiodiversityHeritageApiKey_FOR_TESTS}}
@@ -400,9 +396,16 @@ jobs:
400
396
CI : " true"
401
397
DBMS : " postgresql"
402
398
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
+
403
405
jbang :
404
406
name : JBang (main)
405
407
runs-on : ubuntu-latest
408
+ needs : publish
406
409
if : github.ref == 'refs/heads/main'
407
410
steps :
408
411
- name : Checkout source
@@ -438,6 +441,7 @@ jobs:
438
441
jbang-pr :
439
442
name : JBang (PR)
440
443
runs-on : ubuntu-latest
444
+ # does not need publish, because the JBang scripts are modified
441
445
if : github.ref != 'refs/heads/main'
442
446
strategy :
443
447
fail-fast : false
You can’t perform that action at this time.
0 commit comments