diff --git a/actions/release-post-merge/action.yml b/actions/release-post-merge/action.yml index 827991f..1b6036f 100644 --- a/actions/release-post-merge/action.yml +++ b/actions/release-post-merge/action.yml @@ -173,6 +173,25 @@ runs: prepared_id="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["id"];' "${RELEASE_STATE_DIR}/prepared-release.json")" echo "prepared-release-id=${prepared_id}" >> "${GITHUB_OUTPUT}" + { + echo "## History synchronization" + echo + php -r ' + $p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); + $items=$p["history_synchronizations"] ?? [$p["history_synchronization"]]; + foreach ($items as $item) { + $branch=$item["target_branch"]; + $state=$item["state"]; + $pr=$item["pull_request"] ?? null; + if (is_array($pr) && isset($pr["url"], $pr["number"])) { + printf("- `%s`: **%s** — [#%d](%s)\n", $branch, $state, $pr["number"], $pr["url"]); + } else { + printf("- `%s`: **%s**\n", $branch, $state); + } + } + ' "${RELEASE_STATE_DIR}/prepared-release.json" + } >> "${GITHUB_STEP_SUMMARY}" + - id: milestone name: Apply milestone transition shell: bash diff --git a/actions/release-prepare/action.yml b/actions/release-prepare/action.yml index 1b248ff..9607acf 100644 --- a/actions/release-prepare/action.yml +++ b/actions/release-prepare/action.yml @@ -164,6 +164,8 @@ runs: RELEASE_TOOL_PATH: ${{ steps.plan.outputs.tool-path }} RELEASE_PLAN_PATH: ${{ steps.plan.outputs.plan-path }} RELEASE_CONFIG_PATH: ${{ inputs.config-path }} + RELEASE_REQUESTED_BY: ${{ inputs.actor }} + RELEASE_TOOL_VERSION: ${{ steps.plan.outputs.tool-version }} run: | set -euo pipefail state_dir="${RUNNER_TEMP}/release-preparation-state" @@ -189,10 +191,22 @@ runs: echo "artifact-name=${artifact_name}" >> "${GITHUB_OUTPUT}" echo "state-dir=${state_dir}" >> "${GITHUB_OUTPUT}" + plan_id="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["id"];' "${RELEASE_PLAN_PATH}")" + release_branch="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["branch"];' "${RELEASE_PLAN_PATH}")" + planning_base="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["planning_base_sha"];' "${RELEASE_PLAN_PATH}")" + release_version="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["proposed_version"];' "${RELEASE_PLAN_PATH}")" + release_channel="$(php -r '$p=json_decode(file_get_contents($argv[1]),true,512,JSON_THROW_ON_ERROR); echo $p["channel"];' "${RELEASE_PLAN_PATH}")" + { echo "## Release preparation" echo - printf -- '- Preparation: `%s`\n' "${preparation_id}" + printf -- '- Requested by: `%s`\n' "${RELEASE_REQUESTED_BY}" + printf -- '- Branch: `%s`\n' "${release_branch}" + printf -- '- Planning base: `%s`\n' "${planning_base}" + printf -- '- Version: `%s` (%s)\n' "${release_version}" "${release_channel}" + printf -- '- release-tool: `%s`\n' "${RELEASE_TOOL_VERSION}" + printf -- '- ReleasePlan: `%s`\n' "${plan_id}" + printf -- '- ReleasePreparation: `%s`\n' "${preparation_id}" echo "- Pull request: ${pr_url}" printf -- '- State artifact: `%s`\n' "${artifact_name}" } >> "${GITHUB_STEP_SUMMARY}"