diff options
| author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-06-17 18:02:11 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 18:02:11 -0700 | 
| commit | ee5d1102c3300bc46467965973fbfa725130393e (patch) | |
| tree | 6fc4fed4bac769a70906e30a12ef610874624c19 | |
| parent | 375555012f92c1b836f2d122754f9facd050be62 (diff) | |
| parent | dd64c39d64ef0b829952dac5c4ef61c51671b9d4 (diff) | |
Merge pull request #1763 from secondlife/brad/tag-nightly
Setting up scheduled and manually dispatched releases.
| -rw-r--r-- | .github/workflows/build.yaml | 9 | ||||
| -rw-r--r-- | .github/workflows/tag-release.yaml | 46 | ||||
| -rw-r--r-- | indra/newview/llversioninfo.cpp | 2 | 
3 files changed, 50 insertions, 7 deletions
| diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 57faafc042..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/*"] @@ -231,6 +225,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 diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml new file mode 100644 index 0000000000..2a375e0375 --- /dev/null +++ b/.github/workflows/tag-release.yaml @@ -0,0 +1,46 @@ +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-release: +    runs-on: ubuntu-latest +    steps: +      - 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 +        if: ${{ secrets.GITHUB_NIGHTLY_TOKEN != "" }} +        with: +          github-token: ${{ secrets.GITHUB_NIGHTLY_TOKEN }} +          script: | +            github.rest.git.createRef( +              owner: context.repo.owner, +              repo: context.repo.repo, +              ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.NIGHTLY_DATE }}", +              sha: context.sha +            ) 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"); | 
