|
65 | 65 | outputs: |
66 | 66 | release_output_url: ${{ steps.release.outputs.url }} |
67 | 67 | updated_version: ${{ steps.update-version.outputs.UPDATED_VERSION}} |
| 68 | + RELEASE_NOTES: ${{ env.RELEASE_NOTES }} |
68 | 69 | steps: |
69 | 70 | - name: Fast Fail if secrets are missing |
70 | 71 | if: ${{ env.KEYSTORE_CONTENT == '' || env.BUILD_JSON_CONTENT == '' }} |
|
201 | 202 | - name: Check Nightly Tag and Force Update |
202 | 203 | #if: github.event_name == 'push' && contains(github.event.ref, 'tags/nightly') == false |
203 | 204 | if: ${{ ! inputs.skip_tagging_and_releases }} |
| 205 | + id: check-nightly-tag-force-update |
204 | 206 | run: | |
205 | 207 | # Check if the nightly tag exists and get the commit it points to |
206 | 208 | if git show-ref --quiet refs/tags/nightly; then |
|
223 | 225 | echo "Nightly tag already points to this commit. Skipping update." |
224 | 226 | fi |
225 | 227 |
|
| 228 | + |
| 229 | + - name: Generate Release Notes (Experimental) |
| 230 | + if: ${{ success() && env.releaseRequired == 'true' }} |
| 231 | + id: gen-release-notes |
| 232 | + continue-on-error: true |
| 233 | + run: | |
| 234 | + RELEASE_NOTES=$(node utils/scripts/generate-release-notes.js ${{ github.repository_owner }} Acode ${{ github.sha }} --format md --from-tag ${{ env.TAG_COMMIT }} --important-only --quiet --changelog-only) |
| 235 | + { |
| 236 | + echo "RELEASE_NOTES<<EOF" |
| 237 | + echo "$RELEASE_NOTES" |
| 238 | + echo "EOF" |
| 239 | + } >> $GITHUB_ENV |
226 | 240 | - name: Release Nightly Version |
227 | 241 | # Only run this step, if not called from another workflow. And a previous step is successful with releasedRequired=true |
228 | 242 | id: release |
229 | | - if: ${{ ! inputs.skip_tagging_and_releases && success() && env.releaseRequired == 'true' && !inputs.is_PR }} |
| 243 | + if: ${{ ! inputs.skip_tagging_and_releases && steps.check-nightly-tag-force-update.outcome == 'success' && env.releaseRequired == 'true' && !inputs.is_PR }} |
230 | 244 | uses: softprops/action-gh-release@v2 |
231 | 245 | with: |
232 | 246 | prerelease: true |
|
240 | 254 | |
241 | 255 | [Compare Changes](https://github.com/${{ github.repository }}/compare/${{ env.TAG_COMMIT }}...${{ github.sha }}) |
242 | 256 |
|
| 257 | + ${{ env.RELEASE_NOTES }} |
| 258 | +
|
243 | 259 | - name: Update Last Comment by bot (If ran in PR) |
244 | 260 | if: inputs.is_PR |
245 | 261 | uses: marocchino/sticky-pull-request-comment@v2 |
|
261 | 277 | with: |
262 | 278 | tag_name: ${{ needs.build.outputs.updated_version }} |
263 | 279 | url: ${{ needs.build.outputs.release_output_url }} |
| 280 | + body: ${{ needs.build.outputs.RELEASE_NOTES }} |
264 | 281 | secrets: |
265 | 282 | DISCORD_WEBHOOK_RELEASE_NOTES: ${{ secrets.DISCORD_WEBHOOK_RELEASE_NOTES }} |
0 commit comments