summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-11-14 04:09:56 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-03-01 16:13:29 -0500
commitcac7023996d691f00101429830a23b2cef3a2f83 (patch)
tree32dc97e18dde76d254795de677b9bd20e19625cc /.github
parente0ae227d0af39ee1c55d167d5091889f821ce124 (diff)
SL-20546: Append generated release notes body to our explicit body.
For a tag build that generates a release page, try to deduce the git branch to which the tag we're building corresponds and add that to release notes. (cherry picked from commit 9e99bb04a32f2ecc0f0b99686ce5a7adb356596d)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yaml11
1 files changed, 11 insertions, 0 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 9d04fbe87a..c0bec11275 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -24,6 +24,7 @@ jobs:
outputs:
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
viewer_version: ${{ steps.build.outputs.viewer_version }}
+ viewer_branch: ${{ steps.build.outputs.viewer_branch }}
imagename: ${{ steps.build.outputs.imagename }}
env:
AUTOBUILD_ADDRSIZE: 64
@@ -176,9 +177,17 @@ jobs:
if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]]
then viewer_channel="${GITHUB_REF_NAME%#*}"
export viewer_channel="${viewer_channel//_/ }"
+ # Since GITHUB_REF_NAME is a tag rather than a branch, we need
+ # to discover to what branch this tag corresponds. Get the tip
+ # commit (for the tag) and then ask for branches containing it.
+ # Assume GitHub cloned only this tag and its containing branch.
+ viewer_branch="$(git branch --contains "$(git log -n 1 --format=%h)" |
+ grep -v '(HEAD')"
else export viewer_channel="Second Life Test"
+ viewer_branch="${GITHUB_REF_NAME}"
fi
echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
+ echo "viewer_branch=$viewer_branch" >> "$GITHUB_OUTPUT"
# On windows we need to point the build to the correct python
# as neither CMake's FindPython nor our custom Python.cmake module
@@ -365,8 +374,10 @@ jobs:
body: |
${{ needs.build.outputs.viewer_channel }}
${{ needs.build.outputs.viewer_version }}
+ ${{ needs.build.outputs.viewer_branch }}
prerelease: true
generate_release_notes: true
+ append_body: true
# the only reason we generate a GH release is to post build products
fail_on_unmatched_files: true
files: |