Skip to content

Commit 2559b27

Browse files
authored
Populate ddev GitHub release body with version changelog (DataDog#23587)
1 parent f9a6a51 commit 2559b27

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/build-ddev.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,46 @@ jobs:
771771
with:
772772
skip-existing: true
773773

774+
- name: Set up Python ${{ env.PYTHON_VERSION }}
775+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
776+
with:
777+
python-version: "${{ env.PYTHON_VERSION }}"
778+
779+
- name: Install uv
780+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
781+
with:
782+
enable-cache: false
783+
784+
- name: Install ddev from local folder
785+
working-directory: .
786+
run: uv pip install --system -e ./datadog_checks_dev[cli] -e ./ddev
787+
788+
- name: Configure ddev
789+
working-directory: .
790+
run: |-
791+
ddev config override
792+
ddev config set upgrade_check false
793+
794+
# Extraction is best-effort: PyPI publish has already happened by this point, so any failure
795+
# here must not abort the workflow before the GitHub release is created. On failure we log a
796+
# warning, leave the body file empty, and let the release proceed with an empty body.
797+
- name: Extract release notes from CHANGELOG
798+
id: release-notes
799+
working-directory: .
800+
run: |
801+
version="${GITHUB_REF_NAME#ddev-v}"
802+
notes_file="${RUNNER_TEMP}/release-notes.md"
803+
: > "$notes_file"
804+
if ! ddev release changelog show ddev "$version" --file "$notes_file"; then
805+
echo "::warning::Failed to extract changelog section for ddev $version; release body will be empty."
806+
: > "$notes_file"
807+
fi
808+
echo "path=$notes_file" >> "$GITHUB_OUTPUT"
809+
774810
- name: Add assets to current release
775811
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
776812
with:
813+
body_path: ${{ steps.release-notes.outputs.path }}
777814
files: |-
778815
archives/*
779816
installers/*

0 commit comments

Comments
 (0)