From 3f74294584019d4461f535dbd6bbf2edd570795d Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Sat, 5 Jul 2025 21:49:47 -0500 Subject: [PATCH] fix(ci): default location for generated release notes --- helper-scripts/common/generate-release-notes.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/helper-scripts/common/generate-release-notes.sh b/helper-scripts/common/generate-release-notes.sh index eb837640e..6c8cf16df 100755 --- a/helper-scripts/common/generate-release-notes.sh +++ b/helper-scripts/common/generate-release-notes.sh @@ -261,8 +261,13 @@ for repo in "${ALL_REPOS[@]}"; do analyze_api_changes "$repo" "$repo_name" done +# Set output directory and create if needed +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OUTPUT_DIR="${SCRIPT_DIR}/../output/release-notes" +mkdir -p "$OUTPUT_DIR" + # Generate markdown output -OUTPUT_FILE="release-notes-${TO_VERSION}.md" +OUTPUT_FILE="$OUTPUT_DIR/release-notes-${TO_VERSION}.md" cat > "$OUTPUT_FILE" << EOF ## ${TO_VERSION} {date="${RELEASE_DATE}"} @@ -388,4 +393,10 @@ EOF echo -e "\n${GREEN}Release notes generated in: ${OUTPUT_FILE}${NC}" echo -e "${YELLOW}Please review and edit the generated notes before adding to documentation.${NC}" -echo -e "${BLUE}API changes have been automatically detected and included.${NC}" \ No newline at end of file +echo -e "${BLUE}API changes have been automatically detected and included.${NC}" + +# If running in GitHub Actions, also output the relative path for artifact collection +if [ -n "${GITHUB_WORKSPACE}" ] || [ -n "${GITHUB_ACTIONS}" ]; then + RELATIVE_PATH="${OUTPUT_FILE#${GITHUB_WORKSPACE}/}" + echo -e "\n${GREEN}Relative path for GitHub Actions: ${RELATIVE_PATH}${NC}" +fi \ No newline at end of file