Skip to content

Commit ca4a2ad

Browse files
update: enhance nightly build workflow by adding a step to generate release notes and updating conditions for releasing nightly versions. The new step checks for the existence of a nightly tag and captures release notes if required.
1 parent 7c3cdd7 commit ca4a2ad

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/nightly-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
- name: Check Nightly Tag and Force Update
187187
#if: github.event_name == 'push' && contains(github.event.ref, 'tags/nightly') == false
188188
if: ${{ ! inputs.skip_tagging_and_releases }}
189+
id: check-nightly-tag-force-update
189190
run: |
190191
# Check if the nightly tag exists and get the commit it points to
191192
if git show-ref --quiet refs/tags/nightly; then
@@ -208,10 +209,18 @@
208209
echo "Nightly tag already points to this commit. Skipping update."
209210
fi
210211
212+
213+
- name: Generate Release Notes (Experimental)
214+
if: ${{ success() && env.releaseRequired == 'true' }}
215+
id: gen-release-notes
216+
continue-on-error: true
217+
run: |
218+
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)
219+
echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
211220
- name: Release Nightly Version
212221
# Only run this step, if not called from another workflow. And a previous step is successful with releasedRequired=true
213222
id: release
214-
if: ${{ ! inputs.skip_tagging_and_releases && success() && env.releaseRequired == 'true' }}
223+
if: ${{ ! inputs.skip_tagging_and_releases && steps.check-nightly-tag-force-update.outcome == 'success' && env.releaseRequired == 'true' }}
215224
uses: softprops/action-gh-release@v2
216225
with:
217226
prerelease: true
@@ -224,6 +233,8 @@
224233
225234
[Compare Changes](https://github.com/${{ github.repository }}/compare/${{ env.TAG_COMMIT }}...${{ github.sha }})
226235
236+
${{ env.RELEASE_NOTES }}
237+
227238
- name: Update Last Comment by bot (If ran in PR)
228239
if: inputs.is_PR
229240
uses: marocchino/sticky-pull-request-comment@v2

0 commit comments

Comments
 (0)