Skip to content

Commit b438198

Browse files
authored
feat(release): include nightly changelogs in Discord announcements (#15754)
1 parent 484459f commit b438198

3 files changed

Lines changed: 782 additions & 170 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,24 @@ jobs:
13471347
args:
13481348
- --filter=@t3tools/scripts...
13491349
1350+
- name: Read published release notes
1351+
if: needs.preflight.outputs.is_prerelease == 'true'
1352+
continue-on-error: true
1353+
env:
1354+
GH_TOKEN: ${{ github.token }}
1355+
GH_REPO: ${{ github.repository }}
1356+
RELEASE_TAG: ${{ needs.preflight.outputs.tag }}
1357+
RELEASE_CHANNEL: ${{ needs.preflight.outputs.release_channel }}
1358+
run: |
1359+
if [ "$RELEASE_CHANNEL" = 'nightly' ]; then
1360+
if ! gh release view "$RELEASE_TAG" --json body --jq '.body // ""' > "$RUNNER_TEMP/discord-release-notes.md"; then
1361+
: > "$RUNNER_TEMP/discord-release-notes.md"
1362+
echo '::warning::Could not read published release notes; announcing without a changelog.'
1363+
fi
1364+
else
1365+
: > "$RUNNER_TEMP/discord-release-notes.md"
1366+
fi
1367+
13501368
- name: Announce prerelease on Discord
13511369
if: needs.preflight.outputs.is_prerelease == 'true'
13521370
continue-on-error: true
@@ -1359,7 +1377,8 @@ jobs:
13591377
--release-name "${{ needs.preflight.outputs.release_name }}" \
13601378
--release-version "${{ needs.preflight.outputs.version }}" \
13611379
--tag "${{ needs.preflight.outputs.tag }}" \
1362-
--release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"
1380+
--release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}" \
1381+
--release-notes-file "$RUNNER_TEMP/discord-release-notes.md"
13631382
13641383
- name: Announce latest release on Discord
13651384
if: needs.preflight.outputs.make_latest == 'true'

0 commit comments

Comments
 (0)