diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-11-14 04:09:56 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-11-14 04:09:56 -0500 |
commit | 9e99bb04a32f2ecc0f0b99686ce5a7adb356596d (patch) | |
tree | 373f00f03ebd3ae108a5be2f08181b2a03467691 /.github/workflows/build.yaml | |
parent | 5f1008ab6b5dd59a80123be7580b7a1f1da4c259 (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.
Diffstat (limited to '.github/workflows/build.yaml')
-rw-r--r-- | .github/workflows/build.yaml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3a32a03b3f..895fb00506 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: "assets/*" |