Skip to content

Commit 3f74294

Browse files
committed
fix(ci): default location for generated release notes
1 parent 6506c5f commit 3f74294

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

helper-scripts/common/generate-release-notes.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,13 @@ for repo in "${ALL_REPOS[@]}"; do
261261
analyze_api_changes "$repo" "$repo_name"
262262
done
263263

264+
# Set output directory and create if needed
265+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
266+
OUTPUT_DIR="${SCRIPT_DIR}/../output/release-notes"
267+
mkdir -p "$OUTPUT_DIR"
268+
264269
# Generate markdown output
265-
OUTPUT_FILE="release-notes-${TO_VERSION}.md"
270+
OUTPUT_FILE="$OUTPUT_DIR/release-notes-${TO_VERSION}.md"
266271
cat > "$OUTPUT_FILE" << EOF
267272
## ${TO_VERSION} {date="${RELEASE_DATE}"}
268273
@@ -388,4 +393,10 @@ EOF
388393

389394
echo -e "\n${GREEN}Release notes generated in: ${OUTPUT_FILE}${NC}"
390395
echo -e "${YELLOW}Please review and edit the generated notes before adding to documentation.${NC}"
391-
echo -e "${BLUE}API changes have been automatically detected and included.${NC}"
396+
echo -e "${BLUE}API changes have been automatically detected and included.${NC}"
397+
398+
# If running in GitHub Actions, also output the relative path for artifact collection
399+
if [ -n "${GITHUB_WORKSPACE}" ] || [ -n "${GITHUB_ACTIONS}" ]; then
400+
RELATIVE_PATH="${OUTPUT_FILE#${GITHUB_WORKSPACE}/}"
401+
echo -e "\n${GREEN}Relative path for GitHub Actions: ${RELATIVE_PATH}${NC}"
402+
fi

0 commit comments

Comments
 (0)