@@ -78,25 +78,24 @@ jobs:
7878 - name : Create PR release
7979 env :
8080 GH_TOKEN : ${{ secrets.PR_BUILDS_TOKEN }}
81+ PR_NUMBER : ${{ steps.pr.outputs.number }}
82+ SHORT_SHA : ${{ steps.info.outputs.short_sha }}
83+ HEX_COUNT : ${{ steps.info.outputs.count }}
84+ HEAD_SHA : ${{ github.event.workflow_run.head_sha }}
85+ REPO : ${{ github.repository }}
8186 run : |
82- PR_NUMBER="${{ steps.pr.outputs.number }}"
83- SHORT_SHA="${{ steps.info.outputs.short_sha }}"
84- COUNT="${{ steps.info.outputs.count }}"
85- PR_URL="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}"
86-
87- NOTES="Test build for [PR #${PR_NUMBER}](${PR_URL}) — commit \`${SHORT_SHA}\`
88-
89- **${COUNT} targets built.** Find your board's \`.hex\` file by name (e.g. \`MATEKF405SE.hex\`).
90-
91- > Development build for testing only. Use Full Chip Erase when flashing."
92-
93- cd hexes
94- gh release create "pr-${PR_NUMBER}" *.hex \
87+ PR_URL="https://github.com/${REPO}/pull/${PR_NUMBER}"
88+ printf '%s\n\n%s\n\n%s\n' \
89+ "Test build for [PR #${PR_NUMBER}](${PR_URL}) — commit \`${SHORT_SHA}\`" \
90+ "**${HEX_COUNT} targets built.** Find your board's \`.hex\` file by name (e.g. \`MATEKF405SE.hex\`)." \
91+ "> Development build for testing only. Use Full Chip Erase when flashing." \
92+ > release-notes.md
93+ gh release create "pr-${PR_NUMBER}" hexes/*.hex \
9594 --repo iNavFlight/pr-test-builds \
9695 --prerelease \
97- --target "${{ github.event.workflow_run.head_sha } }" \
96+ --target "${HEAD_SHA }" \
9897 --title "PR #${PR_NUMBER} (${SHORT_SHA})" \
99- --notes "${NOTES}"
98+ --notes-file release-notes.md
10099
101100 - name : Post or update PR comment
102101 uses : actions/github-script@v7
0 commit comments