diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index 3428ac7678..2f388ad066 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -1,8 +1,8 @@ name: Base Installer on: schedule: - # Runs every day at 02:30 UTC (which is 6:30pm PST / 7:30pm PDT) - - cron: "30 2 * * *" + # Runs every Monday at 02:30 UTC (which is 6:30pm PST / 7:30pm PDT Sunday evening) + - cron: "30 2 * * 1" workflow_dispatch: inputs: fw_ref: @@ -50,7 +50,7 @@ jobs: $githubRun = $env:GITHUB_RUN_NUMBER $combined = $lastJenkins + $githubRun echo "Calculated build number: $combined" - echo "RELEASE_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV + echo "FW_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV - name: Checkout Files uses: actions/checkout@v4 @@ -237,7 +237,7 @@ jobs: $offlineFile = Split-Path $offlineExe -Leaf $onlineFile = Split-Path $onlineExe -Leaf - $s3BasePath = "jobs/FieldWorks-Win-all-Release-Base/$($env:RELEASE_BUILD_NUMBER)" + $s3BasePath = "jobs/FieldWorks-Win-all-Release-Base/$($env:FW_BUILD_NUMBER)" $offlineS3Key = "$s3BasePath/$offlineFile" $onlineS3Key = "$s3BasePath/$onlineFile" @@ -272,8 +272,8 @@ jobs: if: ${{ inputs.make_release == 'true' }} uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 with: - tag_name: build-${{ env.RELEASE_BUILD_NUMBER }} - name: "FieldWorks Base Build #${{ env.RELEASE_BUILD_NUMBER }}" + tag_name: build-${{ env.FW_BUILD_NUMBER }} + name: "FieldWorks Base Build #${{ env.FW_BUILD_NUMBER }}" draft: false prerelease: true fail_on_unmatched_files: true diff --git a/.github/workflows/patch-installer-cd.yml b/.github/workflows/patch-installer-cd.yml index 37aff02f78..2ba7939612 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -2,6 +2,9 @@ name: Patch Installer on: push: branches: ["release/9.3"] + schedule: + # Runs every Monday at 03:30 UTC (which is 8:30pm MST/PDT Sunday evening) + - cron: "30 3 * * 1" workflow_dispatch: inputs: fw_ref: @@ -60,7 +63,7 @@ jobs: $githubRun = $env:GITHUB_RUN_NUMBER $combined = $lastJenkins + $githubRun echo "Calculated build number: $combined" - echo "RELEASE_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV + echo "FW_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV - name: Checkout Files uses: actions/checkout@v4 @@ -278,7 +281,7 @@ jobs: throw "Unexpected patch filename format: $patchFile" } $patchWithBaseInName = "$($Matches[1])${baseBuildNumber}$($Matches[2])" - $s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:RELEASE_BUILD_NUMBER)/$patchWithBaseInName" + $s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:FW_BUILD_NUMBER)/$patchWithBaseInName" aws s3 cp $patchPath "s3://flex-updates/$s3Key" Write-Host "Uploaded to s3://flex-updates/$s3Key" diff --git a/Build/Src/FwBuildTasks/Substitute.cs b/Build/Src/FwBuildTasks/Substitute.cs index 33c0c81f28..b7b404184b 100644 --- a/Build/Src/FwBuildTasks/Substitute.cs +++ b/Build/Src/FwBuildTasks/Substitute.cs @@ -77,11 +77,11 @@ public override bool Execute() var numberOfDays = Convert.ToInt32(Math.Truncate(DateTime.Now.ToOADate())).ToString(); fileContents = regex.Replace(fileContents, numberOfDays); - // GHA builds set the RELEASE_BUILD_NUMBER in the environment - var buildNumber = Environment.GetEnvironmentVariable("RELEASE_BUILD_NUMBER"); + // FW's GHA build scripts set FW_BUILD_NUMBER in the environment + var buildNumber = Environment.GetEnvironmentVariable("FW_BUILD_NUMBER"); if (string.IsNullOrEmpty(buildNumber)) { - // fall back to number of days if no RELEASE_BUILD_NUMBER is in the environment + // fall back to number of days if no FW_BUILD_NUMBER is in the environment buildNumber = numberOfDays; } regex = new Regex("\\$BUILDNUMBER");