From 41cb778fb0a2918816965ccc0ece5d0080d5180a Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 13 Jun 2024 17:37:03 -0700 Subject: [PATCH 1/7] Initial work setting up scheduled releases for develop branch. --- .github/workflows/tag-nightly.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/tag-nightly.yaml diff --git a/.github/workflows/tag-nightly.yaml b/.github/workflows/tag-nightly.yaml new file mode 100644 index 0000000000..8193d68f2f --- /dev/null +++ b/.github/workflows/tag-nightly.yaml @@ -0,0 +1,27 @@ +name: Tag Nightly Builds + +on: + # schedule event triggers always run on the default branch + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule + schedule: + - cron: "21 2 * * 2,4,6" # 2:21am UTC tues/thurs/sat == 7:21pm PDT mon/wed/fri -- see https://crontab.guru/#21_01_*_*_2,4,6 + workflow_dispatch: + +jobs: + tag-develop-nightly: + runs-on: ubuntu-latest + steps: + - name: Setup Date Env + run: | + echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV} + - name: Update Tag + uses: actions/github-script@v7.0.1 + with: + github-token: ${{ secrets.GITHUB_NIGHTLY_TOKEN }} + script: | + github.rest.git.createRef( + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/Second_Life_Develop#${{ env.NIGHTLY_DATE }}", + sha: context.sha + ) From b9f287815a39c69f3db5212f06a295d1e5dbb6da Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 13 Jun 2024 17:52:34 -0700 Subject: [PATCH 2/7] Add new viewer_channel detection for develop branch --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 57faafc042..f9b0bdc309 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -231,6 +231,9 @@ jobs: elif [[ "$prefix" == "release" || "$prefix" == "main" ]]; then export viewer_channel="Second Life Release" + elif [[ "$branch" == "develop" ]]; + then + export viewer_channel="Second Life Develop" else export viewer_channel="Second Life Test" fi From 0e1e1685d4b94d32d32641f4d241dea3a7d0980d Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 13 Jun 2024 18:14:21 -0700 Subject: [PATCH 3/7] Skip the actual tag update step gracefully until we have proper tokens set up --- .github/workflows/tag-nightly.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tag-nightly.yaml b/.github/workflows/tag-nightly.yaml index 8193d68f2f..bb9e7094ec 100644 --- a/.github/workflows/tag-nightly.yaml +++ b/.github/workflows/tag-nightly.yaml @@ -16,6 +16,7 @@ jobs: echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV} - name: Update Tag uses: actions/github-script@v7.0.1 + if: ${{ secrets.GITHUB_NIGHTLY_TOKEN != "" }} with: github-token: ${{ secrets.GITHUB_NIGHTLY_TOKEN }} script: | From e22408a27e28d7ae9cf7e2dddc557c398cfd140a Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Fri, 14 Jun 2024 15:08:50 -0700 Subject: [PATCH 4/7] make Second Life Develop be recognized as a Beta channel --- indra/newview/llversioninfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index c3dc07f357..a571b5544b 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -135,7 +135,7 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() std::string channel = getChannel(); static const boost::regex is_test_channel("\\bTest\\b"); - static const boost::regex is_beta_channel("\\bBeta\\b"); + static const boost::regex is_beta_channel("\\b(Beta|Develop)\\b"); // Develop is an alias for Beta static const boost::regex is_project_channel("\\bProject\\b"); static const boost::regex is_release_channel("\\bRelease\\b"); From 84a221e7dd408bf123be2adaa9c4e33ba4509a0d Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 17 Jun 2024 17:41:53 -0700 Subject: [PATCH 5/7] Renamed tag-nightly.yaml to generalize it to other tags when using workflow_dispatch --- .github/workflows/{tag-nightly.yaml => tag-release.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{tag-nightly.yaml => tag-release.yaml} (100%) diff --git a/.github/workflows/tag-nightly.yaml b/.github/workflows/tag-release.yaml similarity index 100% rename from .github/workflows/tag-nightly.yaml rename to .github/workflows/tag-release.yaml From b9a8b3b240512bdf5bbb99f6bc581872fead86b8 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 17 Jun 2024 17:42:30 -0700 Subject: [PATCH 6/7] Update naming and add options to tag-release workflow_dispatch. --- .github/workflows/tag-release.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index bb9e7094ec..8bb498219d 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -1,14 +1,30 @@ -name: Tag Nightly Builds +name: Tag a Build on: # schedule event triggers always run on the default branch # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule schedule: + # run "nightly" builds on default branch every mon/wed/fri - cron: "21 2 * * 2,4,6" # 2:21am UTC tues/thurs/sat == 7:21pm PDT mon/wed/fri -- see https://crontab.guru/#21_01_*_*_2,4,6 workflow_dispatch: + inputs: + - channel: + description: "Channel to configure the build" + required: true + type: choice + default: "Test" + options: + - "Test" + - "Develop" + - "Project" + - "Release" + - project: + description: "Project Name (used for channel name in project builds, and tag name for all builds)" + default: "hippo" + # TODO - add an input for selecting another sha to build other than head of branch jobs: - tag-develop-nightly: + tag-release: runs-on: ubuntu-latest steps: - name: Setup Date Env From dd64c39d64ef0b829952dac5c4ef61c51671b9d4 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 17 Jun 2024 17:55:29 -0700 Subject: [PATCH 7/7] Pass through input channel to select the tag channel name --- .github/workflows/build.yaml | 6 ------ .github/workflows/tag-release.yaml | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f9b0bdc309..aa504f51d8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,12 +1,6 @@ name: Build on: - workflow_dispatch: - inputs: - release_run: - type: boolean - description: Do a release of this build - default: false pull_request: push: branches: ["main", "release/*", "project/*"] diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 8bb498219d..2a375e0375 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -27,8 +27,10 @@ jobs: tag-release: runs-on: ubuntu-latest steps: - - name: Setup Date Env + - name: Setup Env Vars run: | + CHANNEL="${{ inputs.channel }}" + echo VIEWER_CHANNEL="Second_Life_${CHANNEL:-Develop}" >> ${GITHUB_ENV} echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV} - name: Update Tag uses: actions/github-script@v7.0.1 @@ -39,6 +41,6 @@ jobs: github.rest.git.createRef( owner: context.repo.owner, repo: context.repo.repo, - ref: "refs/tags/Second_Life_Develop#${{ env.NIGHTLY_DATE }}", + ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.NIGHTLY_DATE }}", sha: context.sha )