File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -119,15 +119,21 @@ jobs:
119119 - name : Generate release notes
120120 id : release_notes
121121 run : |
122- # Get repository name from GitHub context
123- REPO_NAME="${{ github.event.repository.name }}"
122+ # Extract project name from first H1 heading in README.md
123+ PROJECT_NAME=$(grep -m 1 '^# ' README.md | sed 's/^# //')
124+
125+ # Fall back to repo name if not found
126+ if [ -z "$PROJECT_NAME" ]; then
127+ PROJECT_NAME="${{ github.event.repository.name }}"
128+ fi
129+
124130 REPO_URL="https://github.com/${{ github.repository }}"
125131
126132 # Use the previous tag we captured before creating the new tag
127133 PREV_TAG="${{ steps.prev_tag.outputs.prev_tag }}"
128134
129135 echo "notes<<EOF" >> $GITHUB_OUTPUT
130- echo "## ${REPO_NAME } ${{ inputs.version }}" >> $GITHUB_OUTPUT
136+ echo "## ${PROJECT_NAME } ${{ inputs.version }}" >> $GITHUB_OUTPUT
131137 echo "" >> $GITHUB_OUTPUT
132138
133139 # Add user-provided description if present
You can’t perform that action at this time.
0 commit comments