From f71662225eadf1589f5331e763e02e0bb1b72137 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 31 Oct 2023 10:50:39 -0400 Subject: SL-20546: Add viewer channel and full version to GitHub release page. --- .github/workflows/build.yaml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1cd0c2526f..3a32a03b3f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -360,6 +360,11 @@ jobs: # name the release page for the build number so we can find it # easily (analogous to looking up a codeticket build page) name: "v${{ github.run_id }}" + # SL-20546: want the channel and version to be visible on the + # release page + body: | + ${{ needs.build.outputs.viewer_channel }} + ${{ needs.build.outputs.viewer_version }} prerelease: true generate_release_notes: true # the only reason we generate a GH release is to post build products -- cgit v1.2.3 From 9e99bb04a32f2ecc0f0b99686ce5a7adb356596d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 14 Nov 2023 04:09:56 -0500 Subject: 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. --- .github/workflows/build.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.github/workflows') 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/*" -- cgit v1.2.3 From 59eeaed1187e7592fd83380045916f2d8b9d58e7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 14 Nov 2023 14:20:51 -0500 Subject: SL-20546: Try harder to infer the branch corresponding to build tag. --- .github/workflows/build.yaml | 8 ++-- .github/workflows/which_branch.py | 77 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/which_branch.py (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 895fb00506..abf14b015e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -178,11 +178,9 @@ jobs: 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')" + # to discover to what branch this tag corresponds. + viewer_branch="$(python3 .github/workflows/which_branch.py \ + --token "${{ github.token }}" ${{ github.workflow_sha }})" else export viewer_channel="Second Life Test" viewer_branch="${GITHUB_REF_NAME}" fi diff --git a/.github/workflows/which_branch.py b/.github/workflows/which_branch.py new file mode 100644 index 0000000000..802ea44b5a --- /dev/null +++ b/.github/workflows/which_branch.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""\ +@file which_branch.py +@author Nat Goodspeed +@date 2023-11-14 +@brief Discover which git branch(es) correspond to a given commit hash. + +$LicenseInfo:firstyear=2023&license=viewerlgpl$ +Copyright (c) 2023, Linden Research, Inc. +$/LicenseInfo$ +""" + +import github +import re +import sys +import subprocess + +class Error(Exception): + pass + +def branches_for(token, commit, repo=None): + """ + Use the GitHub REST API to discover which branch(es) correspond to the + passed commit hash. The commit string can actually be any of the ways git + permits to identify a commit: + + https://git-scm.com/docs/gitrevisions#_specifying_revisions + + branches_for() generates a (possibly empty) sequence of all the branches + of the specified repo for which the specified commit is the tip. + + If repo is omitted or None, assume the current directory is a local clone + whose 'origin' remote is the GitHub repository of interest. + """ + if not repo: + url = subprocess.check_output(['git', 'remote', 'get-url', 'origin'], + text=True) + parts = re.split(r'[:/]', url.rstrip()) + repo = '/'.join(parts[-2:]).removesuffix('.git') + + gh = github.MainClass.Github(token) + grepo = gh.get_repo(repo) + for branch in grepo.get_branches(): + try: + delta = grepo.compare(base=commit, head=branch.name) + except github.GithubException: + continue + + if delta.ahead_by == 0 and delta.behind_by == 0: + yield branch + +def main(*raw_args): + from argparse import ArgumentParser + parser = ArgumentParser(description= +"%(prog)s reports the branch(es) for which the specified commit hash is the tip.", + epilog="""\ +When GitHub Actions launches a tag build, it checks out the specific changeset +identified by the tag, and so 'git branch' reports detached HEAD. But we use +tag builds to build a GitHub 'release' of the tip of a particular branch, and +it's useful to be able to identify which branch that is. +""") + parser.add_argument('-t', '--token', required=True, + help="""GitHub REST API access token""") + parser.add_argument('-r', '--repo', + help="""GitHub repository name, in the form OWNER/REPOSITORY""") + parser.add_argument('commit', + help="""commit hash at the tip of the sought branch""") + + args = parser.parse_args(raw_args) + for branch in branches_for(token=args.token, commit=args.commit, repo=args.repo): + print(branch.name) + +if __name__ == "__main__": + try: + sys.exit(main(*sys.argv[1:])) + except Error as err: + sys.exit(str(err)) -- cgit v1.2.3 From 6654ad14eed674e894d2903e0f2ea37c4e806c0f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 14 Nov 2023 14:30:44 -0500 Subject: SL-20546: Add PyGithub to installed Python packages. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index abf14b015e..ebcabe40c2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -81,7 +81,7 @@ jobs: path: .master-message-template - name: Install autobuild and python dependencies - run: pip3 install autobuild llsd + run: pip3 install autobuild PyGithub llsd - name: Cache autobuild packages uses: actions/cache@v3 -- cgit v1.2.3 From 819604d2cee6d4527cc436bebfacddf8642635ff Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 15 Nov 2023 09:44:38 -0500 Subject: SL-20546: Make dependency on build job explicit, not indirect. The release job has been dependent on sign-and-package-windows and sign-and-package-mac, each of which depends on build. But that indirect dependency doesn't convey access to ${{ needs.build.outputs.xxx }}. Add the build job to direct dependencies so release can access its outputs. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ebcabe40c2..0f590ad3a2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -331,7 +331,7 @@ jobs: version: ${{ needs.build.outputs.viewer_version }} release: - needs: [sign-and-package-windows, sign-and-package-mac] + needs: [build, sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: -- cgit v1.2.3 From 96deda3f63ca12be734fb02e5f9406744bff3629 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 15 Nov 2023 09:52:06 -0500 Subject: SL-20546: build-variables viewer branch no longer exists. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0f590ad3a2..bfe1e1adb1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -71,7 +71,7 @@ jobs: uses: actions/checkout@v4 with: repository: secondlife/build-variables - ref: viewer + ref: master path: .build-variables - name: Checkout master-message-template -- cgit v1.2.3 From 6e8d4f48466a5bbad2fcc27bc2877a30e575d4ce Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 18 Dec 2023 10:59:03 -0500 Subject: DRTVWR-601: Make autobuild set vcs_url, vcs_branch, vcs_revision in viewer's autobuild-package.xml. Ensure that AUTOBUILD_VCS_BRANCH is set before the build. (cherry picked from commit b782ab73e640e434e4ed67fa8dfc951f09757585) --- .github/workflows/build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d7f0daf8b3..da7e0b9809 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,6 +34,9 @@ jobs: AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables + # Direct autobuild to store vcs_url, vcs_branch and vcs_revision in + # autobuild-package.xml. + AUTOBUILD_VCS_INFO: "true" AUTOBUILD_VSVER: "170" DEVELOPER_DIR: ${{ matrix.developer_dir }} # Ensure that Linden viewer builds engage Bugsplat. @@ -199,6 +202,11 @@ jobs: fi export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")" + # branch will be something like "origin/mybranch" + branch="$(git branch -r --contains ${{ github.event.pull_request.head.sha || github.sha }} | head -n 1)" + # strip off "origin/" + export AUTOBUILD_VCS_BRANCH="${branch#*/}" + ./build.sh # Each artifact is downloaded as a distinct .zip file. Multiple jobs -- cgit v1.2.3 From ff1741cecae0fac6d94507fa4a6e4662219af707 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 18 Dec 2023 17:35:23 -0500 Subject: DRTVWR-601: Use viewer-build-util/which-branch to determine branch. (cherry picked from commit 2c5066f1fcc0c9f145698ef3aaec72d27bce7181) --- .github/workflows/build.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index da7e0b9809..d21acccbd2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -100,10 +100,17 @@ jobs: if: runner.os == 'Windows' run: choco install nsis-unicode + - name: Determine source branch + id: which-branch + uses: secondlife/viewer-build-util/which-branch@v1 + with: + token: ${{ github.token }} + - name: Build id: build shell: bash env: + AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }} RUNNER_OS: ${{ runner.os }} run: | # set up things the viewer's build.sh script expects @@ -154,7 +161,7 @@ jobs: } repo_branch() { - git -C "$1" branch | grep '^* ' | cut -c 3- + echo "$AUTOBUILD_VCS_BRANCH" } record_dependencies_graph() { @@ -202,11 +209,6 @@ jobs: fi export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")" - # branch will be something like "origin/mybranch" - branch="$(git branch -r --contains ${{ github.event.pull_request.head.sha || github.sha }} | head -n 1)" - # strip off "origin/" - export AUTOBUILD_VCS_BRANCH="${branch#*/}" - ./build.sh # Each artifact is downloaded as a distinct .zip file. Multiple jobs -- cgit v1.2.3 From 09f66828ba573515c3766cce32f4746b8189efcf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 18 Jan 2024 13:34:40 -0500 Subject: SL-20546: Use branch for autobuild package as well as release page. which_branch.py has moved to viewer-build-util as a reusable action. --- .github/workflows/build.yaml | 8 +--- .github/workflows/which_branch.py | 77 --------------------------------------- 2 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 .github/workflows/which_branch.py (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d21acccbd2..deabdf9c1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +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 }} + viewer_branch: ${{ steps.which-branch.outputs.branch }} imagename: ${{ steps.build.outputs.imagename }} env: AUTOBUILD_ADDRSIZE: 64 @@ -187,15 +187,9 @@ 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. - viewer_branch="$(python3 .github/workflows/which_branch.py \ - --token "${{ github.token }}" ${{ github.workflow_sha }})" 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 diff --git a/.github/workflows/which_branch.py b/.github/workflows/which_branch.py deleted file mode 100644 index 802ea44b5a..0000000000 --- a/.github/workflows/which_branch.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python3 -"""\ -@file which_branch.py -@author Nat Goodspeed -@date 2023-11-14 -@brief Discover which git branch(es) correspond to a given commit hash. - -$LicenseInfo:firstyear=2023&license=viewerlgpl$ -Copyright (c) 2023, Linden Research, Inc. -$/LicenseInfo$ -""" - -import github -import re -import sys -import subprocess - -class Error(Exception): - pass - -def branches_for(token, commit, repo=None): - """ - Use the GitHub REST API to discover which branch(es) correspond to the - passed commit hash. The commit string can actually be any of the ways git - permits to identify a commit: - - https://git-scm.com/docs/gitrevisions#_specifying_revisions - - branches_for() generates a (possibly empty) sequence of all the branches - of the specified repo for which the specified commit is the tip. - - If repo is omitted or None, assume the current directory is a local clone - whose 'origin' remote is the GitHub repository of interest. - """ - if not repo: - url = subprocess.check_output(['git', 'remote', 'get-url', 'origin'], - text=True) - parts = re.split(r'[:/]', url.rstrip()) - repo = '/'.join(parts[-2:]).removesuffix('.git') - - gh = github.MainClass.Github(token) - grepo = gh.get_repo(repo) - for branch in grepo.get_branches(): - try: - delta = grepo.compare(base=commit, head=branch.name) - except github.GithubException: - continue - - if delta.ahead_by == 0 and delta.behind_by == 0: - yield branch - -def main(*raw_args): - from argparse import ArgumentParser - parser = ArgumentParser(description= -"%(prog)s reports the branch(es) for which the specified commit hash is the tip.", - epilog="""\ -When GitHub Actions launches a tag build, it checks out the specific changeset -identified by the tag, and so 'git branch' reports detached HEAD. But we use -tag builds to build a GitHub 'release' of the tip of a particular branch, and -it's useful to be able to identify which branch that is. -""") - parser.add_argument('-t', '--token', required=True, - help="""GitHub REST API access token""") - parser.add_argument('-r', '--repo', - help="""GitHub repository name, in the form OWNER/REPOSITORY""") - parser.add_argument('commit', - help="""commit hash at the tip of the sought branch""") - - args = parser.parse_args(raw_args) - for branch in branches_for(token=args.token, commit=args.commit, repo=args.repo): - print(branch.name) - -if __name__ == "__main__": - try: - sys.exit(main(*sys.argv[1:])) - except Error as err: - sys.exit(str(err)) -- cgit v1.2.3 From dd0ec112fe5ded8ed5f69b72b3df26343ca12d35 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 18 Jan 2024 13:43:34 -0500 Subject: SL-20546: PyGithub was only needed for local which_branch.py. Now that which_branch.py has moved to viewer-build-util, so has the PyGithub dependency. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index deabdf9c1e..19a6a0ef6f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -84,7 +84,7 @@ jobs: path: .master-message-template - name: Install autobuild and python dependencies - run: pip3 install autobuild PyGithub llsd + run: pip3 install autobuild llsd - name: Cache autobuild packages uses: actions/cache@v3 -- cgit v1.2.3 From 834cc3d1e094bdc9615e6ba46cf49c8c5db872d7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 18 Jan 2024 15:21:15 -0500 Subject: SL-20546: Test new viewer-build-util branch pr-branch. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 19a6a0ef6f..2e97d7c6dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -102,7 +102,7 @@ jobs: - name: Determine source branch id: which-branch - uses: secondlife/viewer-build-util/which-branch@v1 + uses: secondlife/viewer-build-util/which-branch@pr-branch with: token: ${{ github.token }} -- cgit v1.2.3 From 6555fb3409fbdbd412a8062962c133af7aea7614 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 18 Jan 2024 21:35:48 -0500 Subject: SL-20546: Use viewer-build-util@v1 instead of PR branch. The fix we wanted was on the pr-branch branch of the viewer-build-util repo. Now that it's been published as v1.1.2, the updated v1 tag references the fix, so revert mention to @v1. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2e97d7c6dc..19a6a0ef6f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -102,7 +102,7 @@ jobs: - name: Determine source branch id: which-branch - uses: secondlife/viewer-build-util/which-branch@pr-branch + uses: secondlife/viewer-build-util/which-branch@v1 with: token: ${{ github.token }} -- cgit v1.2.3 From ff543b744ee0b0fd4dd90b46419ae50a570572ab Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 15 Feb 2024 11:21:31 -0500 Subject: Engage new viewer-build-util/which-branch with relnotes output. Put whatever release notes we retrieve into the generated release page. --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 19a6a0ef6f..73df01b8cf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,6 +25,7 @@ jobs: viewer_channel: ${{ steps.build.outputs.viewer_channel }} viewer_version: ${{ steps.build.outputs.viewer_version }} viewer_branch: ${{ steps.which-branch.outputs.branch }} + relnotes: ${{ steps.which-branch.outputs.relnotes }} imagename: ${{ steps.build.outputs.imagename }} env: AUTOBUILD_ADDRSIZE: 64 @@ -102,7 +103,7 @@ jobs: - name: Determine source branch id: which-branch - uses: secondlife/viewer-build-util/which-branch@v1 + uses: secondlife/viewer-build-util/which-branch@relnotes with: token: ${{ github.token }} @@ -377,6 +378,7 @@ jobs: ${{ needs.build.outputs.viewer_channel }} ${{ needs.build.outputs.viewer_version }} ${{ needs.build.outputs.viewer_branch }} + ${{ needs.build.outputs.relnotes }} prerelease: true generate_release_notes: true append_body: true -- cgit v1.2.3 From a908b4cfa98716d4a838fc1e5a6789faa15d16cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Feb 2024 11:23:47 -0500 Subject: Try to generate release notes for this specific branch. Also try to cross-reference release page and build page. --- .github/workflows/build.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1bc74fe084..c78c8c656b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -367,25 +367,30 @@ jobs: mv newview/viewer_version.txt macOS-viewer_version.txt # forked from softprops/action-gh-release - - uses: secondlife-3p/action-gh-release@v1 + - name: Create GitHub release + id: release + uses: secondlife-3p/action-gh-release@v1 with: - # name the release page for the build number so we can find it - # easily (analogous to looking up a codeticket build page) - name: "v${{ github.run_id }}" + # name the release page for the branch + name: "${{ needs.build.outputs.viewer_branch }}" # SL-20546: want the channel and version to be visible on the # release page body: | + Build ${{ github.repositoryUrl }}/actions/runs/${{ github.run_id }} ${{ needs.build.outputs.viewer_channel }} ${{ needs.build.outputs.viewer_version }} - ${{ needs.build.outputs.viewer_branch }} ${{ needs.build.outputs.relnotes }} prerelease: true generate_release_notes: true + target_commitish: ${{ github.ref }} append_body: true - # the only reason we generate a GH release is to post build products fail_on_unmatched_files: true files: | *.dmg *.exe *-autobuild-package.xml *-viewer_version.txt + + - name: post release URL + run: | + echo "::notice::Release ${{ steps.release.outputs.url }}" -- cgit v1.2.3 From c6a6db8488a8b3e7ea6534fbf5e2fe2b17864421 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Feb 2024 12:20:31 -0500 Subject: Try basing the GH release on github.ref_name instead of github.ref. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using github.ref as action-gh-release's target_commitish produces: ⚠️ GitHub release failed with status: 422 [{"resource":"Release","code":"invalid","field":"target_commitish"}] --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c78c8c656b..622ceb4afe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -382,7 +382,7 @@ jobs: ${{ needs.build.outputs.relnotes }} prerelease: true generate_release_notes: true - target_commitish: ${{ github.ref }} + target_commitish: ${{ github.ref_name }} append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From 4edd78f2e54b3cd2e0b0a4b9300dfc669231dd98 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Feb 2024 13:26:29 -0500 Subject: Try basing release notes on github.sha rather than github.ref_name. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 622ceb4afe..6f4325b9dd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -382,7 +382,7 @@ jobs: ${{ needs.build.outputs.relnotes }} prerelease: true generate_release_notes: true - target_commitish: ${{ github.ref_name }} + target_commitish: ${{ github.sha }} append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From 88ebb92f05dade00cc8fc519cc062a458ecd48f2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Feb 2024 15:51:31 -0500 Subject: Leverage action-gh-release's new previous_tag input. This should (!) allow us to generate full release notes relative to the previous viewer release, instead of letting action-gh-release guess incorrectly. Also try again to add to the release page a back-link to the specific build. --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6f4325b9dd..c903f1b8ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -369,20 +369,21 @@ jobs: # forked from softprops/action-gh-release - name: Create GitHub release id: release - uses: secondlife-3p/action-gh-release@v1 + uses: secondlife-3p/action-gh-release@feat/add-generateReleaseNotes with: # name the release page for the branch name: "${{ needs.build.outputs.viewer_branch }}" # SL-20546: want the channel and version to be visible on the # release page body: | - Build ${{ github.repositoryUrl }}/actions/runs/${{ github.run_id }} + Build ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ needs.build.outputs.viewer_channel }} ${{ needs.build.outputs.viewer_version }} ${{ needs.build.outputs.relnotes }} prerelease: true generate_release_notes: true target_commitish: ${{ github.sha }} + previous_tag: 7.1.2-release append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From 27b298d8bc720ff315c8e74cc5bff9ff9ead0552 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Feb 2024 17:05:56 -0500 Subject: Base generated release notes on new floating tag 'release' instead of on the current tag 7.1.2-release. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c903f1b8ce..28310e54e2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -383,7 +383,7 @@ jobs: prerelease: true generate_release_notes: true target_commitish: ${{ github.sha }} - previous_tag: 7.1.2-release + previous_tag: release append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From b42e01d7acf5d4c55612c3a7df0e1ff6ee5ed951 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Feb 2024 08:45:12 -0500 Subject: Reference updated action-gh-release@v1 instead of the branch that got pulled. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 28310e54e2..321ba281cf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -369,7 +369,7 @@ jobs: # forked from softprops/action-gh-release - name: Create GitHub release id: release - uses: secondlife-3p/action-gh-release@feat/add-generateReleaseNotes + uses: secondlife-3p/action-gh-release@v1 with: # name the release page for the branch name: "${{ needs.build.outputs.viewer_branch }}" -- cgit v1.2.3