Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions actions/release-post-merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 15 additions & 1 deletion actions/release-prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}"
Expand Down
Loading