Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit faa285c

Browse files
authored
ci: add release-notes aggregator caller workflow [TECHOPS-498] (#7771)
Thin caller for the reusable workflow in liquibase/build-logic that aggregates `## Release note` H2 blocks from Done Jira tickets in a Community Fix Version. Two triggers: - release: [published] Auto-fires on Community release publish. Derives the Jira Fix Version from the release tag (strip leading 'v', prepend 'Community '). Aggregator output gets appended to the GH Release body. - workflow_dispatch Manual. User enters the Fix Version name. Defaults to dry_run=true — preview only in the step summary + downloadable artifact. All logic lives in liquibase/build-logic#602 (.github/workflows/release-notes-aggregate.yml). Security: every input and event payload field is consumed via env vars in run: blocks per the workflow-injection guide.
1 parent 8ed8669 commit faa285c

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: "Release notes: aggregate from Jira"
2+
3+
# Thin caller for the reusable workflow in liquibase/build-logic.
4+
# Aggregates `## Release note` H2 blocks from every Done Jira ticket
5+
# in a Community Fix Version, renders a markdown report, and either
6+
# previews it in the run summary (dry run) or appends it to the
7+
# GitHub Release body (publish).
8+
#
9+
# Two triggers:
10+
# release: [published] Auto-fires when a Community release is
11+
# published. Derives Jira Fix Version from
12+
# the release tag (strip leading 'v',
13+
# prepend 'Community '). dry_run is false,
14+
# release body gets the notes appended.
15+
# workflow_dispatch Manual. User enters the Fix Version name
16+
# directly. dry_run defaults to true,
17+
# preview-only.
18+
#
19+
# Per TECHOPS-498. Logic lives in liquibase/build-logic.
20+
#
21+
# Security: every workflow input and event payload field is consumed
22+
# via env vars in run: blocks. Never interpolated directly into shell.
23+
24+
on:
25+
release:
26+
types: [published]
27+
workflow_dispatch:
28+
inputs:
29+
version:
30+
description: "Jira Fix Version name (e.g. 'Community 5.0.4')"
31+
required: true
32+
type: string
33+
dry_run:
34+
description: "Preview only — do not post to the GitHub Release body"
35+
required: false
36+
type: boolean
37+
default: true
38+
release_tag:
39+
description: "GitHub Release tag to update when dry_run=false (e.g. 'v5.0.4')"
40+
required: false
41+
type: string
42+
default: ""
43+
44+
permissions:
45+
id-token: write
46+
contents: write
47+
48+
jobs:
49+
derive:
50+
runs-on: ubuntu-latest
51+
outputs:
52+
version: ${{ steps.compute.outputs.version }}
53+
dry_run: ${{ steps.compute.outputs.dry_run }}
54+
release_tag: ${{ steps.compute.outputs.release_tag }}
55+
steps:
56+
- id: compute
57+
env:
58+
EVENT_NAME: ${{ github.event_name }}
59+
MANUAL_VERSION: ${{ inputs.version }}
60+
MANUAL_DRY_RUN: ${{ inputs.dry_run }}
61+
MANUAL_RELEASE_TAG: ${{ inputs.release_tag }}
62+
EVENT_TAG: ${{ github.event.release.tag_name }}
63+
run: |
64+
if [[ "$EVENT_NAME" == "release" ]]; then
65+
stripped="${EVENT_TAG#v}"
66+
{
67+
echo "version=Community ${stripped}"
68+
echo "dry_run=false"
69+
echo "release_tag=${EVENT_TAG}"
70+
} >> "$GITHUB_OUTPUT"
71+
else
72+
{
73+
echo "version=${MANUAL_VERSION}"
74+
echo "dry_run=${MANUAL_DRY_RUN}"
75+
echo "release_tag=${MANUAL_RELEASE_TAG}"
76+
} >> "$GITHUB_OUTPUT"
77+
fi
78+
79+
aggregate:
80+
needs: derive
81+
uses: liquibase/build-logic/.github/workflows/release-notes-aggregate.yml@main
82+
with:
83+
version: ${{ needs.derive.outputs.version }}
84+
dry_run: ${{ needs.derive.outputs.dry_run == 'true' }}
85+
release_tag: ${{ needs.derive.outputs.release_tag }}
86+
secrets: inherit

0 commit comments

Comments
 (0)