diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1dd2c1d5dfa..3abb43b2b2e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,7 +5,7 @@ on: pull_request: push: branches: ["main", "release/*", "project/*"] - tags: ["Second_Life_*"] + tags: ["Second_Life*"] jobs: build: @@ -170,13 +170,18 @@ jobs: # seen before, so numerous tests don't know about it. [[ "$arch" == "MINGW6" ]] && arch=CYGWIN export AUTOBUILD="$(which autobuild)" - # Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a - # viewer channel "Second Life Project Shiny" (ignoring "#hash", - # needed to disambiguate tags). - if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]] - then viewer_channel="${GITHUB_REF_NAME%#*}" - export viewer_channel="${viewer_channel//_/ }" - else export viewer_channel="Second Life Test" + + # determine the viewer channel from the branch name + IFS='/' read -ra ba <<< "$AUTOBUILD_VCS_BRANCH" + prefix=${ba[0]} + if [ "$prefix" == "project" ]; then + proj_name=$(echo ${ba[1]} | sed -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1') + export viewer_channel="Second Life Project $proj_name" + elif [ "$prefix" == "release" ] || [ "$prefix" == "main" ]; + then + export viewer_channel="Second Life Release" + else + export viewer_channel="Second Life Test" fi echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" @@ -326,7 +331,8 @@ jobs: release: needs: [sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') + # Build with a tag like "Second_Life#abcdef0" to generate a release page (used for builds we are planning to deploy). + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') steps: - uses: actions/download-artifact@v3 with: