Skip to content

Commit 5550f8a

Browse files
committed
1 parent 768d188 commit 5550f8a

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

docs/modules/reference/pages/hooks/command.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,3 +1036,33 @@ hooks:
10361036
cmd: 'echo JRELEASER_OUTPUT:foo=bar'
10371037
----
10381038

1039+
== Groups
1040+
1041+
Command hooks may also be grouped by name, allowing for better readability
1042+
1043+
[source,yaml]
1044+
----
1045+
hooks:
1046+
command:
1047+
groups:
1048+
github-summary:
1049+
condition: '"{{ Env.GITHUB_STEP_SUMMARY }}".empty() != true'
1050+
before:
1051+
- filter:
1052+
includes: ['package']
1053+
cmd: 'github-summary header {{command}}'
1054+
success:
1055+
- filter:
1056+
excludes: ['session']
1057+
cmd: 'github-summary success {{event.name}}'
1058+
- filter:
1059+
includes: ['session']
1060+
cmd: 'github-summary new-row'
1061+
failure:
1062+
- filter:
1063+
excludes: ['session']
1064+
cmd: 'github-summary failure {{event.name}}'
1065+
- filter:
1066+
includes: ['session']
1067+
cmd: 'github-summary footer {{event.stacktrace}}'
1068+
----

docs/modules/reference/pages/hooks/script.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,3 +1106,42 @@ hooks:
11061106
run: 'echo JRELEASER_OUTPUT:foo=bar'
11071107
----
11081108

1109+
1110+
== Groups
1111+
1112+
Script hooks may also be grouped by name, allowing for better readability
1113+
1114+
[source,yaml]
1115+
----
1116+
hooks:
1117+
script:
1118+
groups:
1119+
github-summary:
1120+
condition: '"{{ Env.GITHUB_STEP_SUMMARY }}".empty() != true'
1121+
before:
1122+
- filter:
1123+
includes: ['package']
1124+
run: |
1125+
echo "### {{command}}" >> $GITHUB_STEP_SUMMARY
1126+
echo "| Step | Outcome |" >> $GITHUB_STEP_SUMMARY
1127+
echo "| ---- | ------- |" >> $GITHUB_STEP_SUMMARY
1128+
success:
1129+
- filter:
1130+
excludes: ['session']
1131+
run: 'echo "| {{event.name}} | :white_check_mark: |" >> $GITHUB_STEP_SUMMARY'
1132+
- filter:
1133+
includes: ['session']
1134+
run: echo "" >> $GITHUB_STEP_SUMMARY
1135+
failure:
1136+
- filter:
1137+
excludes: ['session']
1138+
run: 'echo "| {{event.name}} | :x: |" >> $GITHUB_STEP_SUMMARY'
1139+
- filter:
1140+
includes: ['session']
1141+
run: |
1142+
echo "" >> $GITHUB_STEP_SUMMARY
1143+
echo "### Failure" >> $GITHUB_STEP_SUMMARY
1144+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
1145+
echo "{{event.stacktrace}}\`\`\`" >> $GITHUB_STEP_SUMMARY
1146+
echo "" >> $GITHUB_STEP_SUMMARY
1147+
----

0 commit comments

Comments
 (0)