From 59da632b5600f9146ff8dddcf9e714154fa39045 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Thu, 25 Jan 2024 14:26:39 +0000 Subject: [PATCH 1/6] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcbec98ba..976f4a85b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Package +name: Test on: workflow_dispatch: @@ -109,4 +109,4 @@ jobs: EPIC_PRODUCTID: ${{ secrets.EPIC_PRODUCTID }} EPIC_ARTIFACTID: ${{ secrets.EPIC_ARTIFACTID }} EPIC_CLIENTID: ${{ secrets.EPIC_CLIENTID }} - EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }} \ No newline at end of file + EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }} From cedf0746eb09689bf3094a6ed908864fe1b47bcd Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Thu, 25 Jan 2024 14:42:58 +0000 Subject: [PATCH 2/6] Update test.yml --- .github/workflows/test.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 976f4a85b..b8e5be5e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,21 +88,35 @@ jobs: id: buildpatch shell: pwsh run: .\download-buildpatchtool.ps1 - - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '16.x' - cache: "yarn" - - - name: Print debug info - run: dotnet --info - name: Deploy to Epic if: ${{ inputs.deploy-epic == true }} shell: pwsh run: | echo "${{ steps.setOutputs.outputs.epicBuildString }}" + + $rootDir = Resolve-Path "." + $extractFolder = Join-Path $rootDir "BuildPatchTool" + $binaryPath = Join-Path $extractFolder "Engine/Binaries/Win64/BuildPatchTool.exe" + $tempFolderName = "EPIC_TEMP" + + $version = "1.10.0" + $executableName = "Vortex.exe" + $folderName = ".\dist\win-unpacked" + $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" + + Write-Output "$rootDir" + Write-Output "$extractFolder" + Write-Output "$binaryPath" + Write-Output "$folderName" + + if (Test-Path -Path "$folderName") { + Write-Output "$folderName folder exists" + } else { + Write-Output "$folderName folder not found" + Exit 1 + } + # ./dist/win-unpacked env: EPIC_ORGID: ${{ secrets.EPIC_ORGID }} From fe73466949d78fc74359ca936eee937644254bb3 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Thu, 25 Jan 2024 14:49:00 +0000 Subject: [PATCH 3/6] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8e5be5e0..8fa0e96a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -102,7 +102,7 @@ jobs: $version = "1.10.0" $executableName = "Vortex.exe" - $folderName = ".\dist\win-unpacked" + $folderName = Join-Path $rootDir "dist\win-unpacked" $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" Write-Output "$rootDir" From 1781b799661d487523844592f16beef4e98d92e4 Mon Sep 17 00:00:00 2001 From: insomnious Date: Thu, 25 Jan 2024 15:21:46 +0000 Subject: [PATCH 4/6] updated epic script --- .github/workflows/test.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fa0e96a2..d0bb9d43d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,23 +99,36 @@ jobs: $extractFolder = Join-Path $rootDir "BuildPatchTool" $binaryPath = Join-Path $extractFolder "Engine/Binaries/Win64/BuildPatchTool.exe" $tempFolderName = "EPIC_TEMP" - - $version = "1.10.0" + $tempFolder = Join-Path $rootDir $tempFolderName + $buildFolder = Join-Path $rootDir "dist\win-unpacked" + $executableName = "Vortex.exe" - $folderName = Join-Path $rootDir "dist\win-unpacked" $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" - Write-Output "$rootDir" - Write-Output "$extractFolder" - Write-Output "$binaryPath" - Write-Output "$folderName" + Write-Output "rootDir $rootDir" + Write-Output "extractFolder $extractFolder" + Write-Output "binaryPath $binaryPath" + Write-Output "tempFolder $tempFolder" + Write-Output "buildFolder $buildFolder" - if (Test-Path -Path "$folderName") { - Write-Output "$folderName folder exists" + if (Test-Path -Path $buildFolder) { + Write-Output "$buildFolder folder exists" } else { - Write-Output "$folderName folder not found" + Write-Output "$buildFolder folder not found" Exit 1 } + + & $binaryPath -mode="UploadBinary" ` + -OrganizationId="$EPIC_ORGID" ` + -ProductId="$EPIC_PRODUCTID" ` + -ArtifactId="$EPIC_ARTIFACTID" ` + -ClientId="$EPIC_CLIENTID" ` + -ClientSecret="$EPIC_CLIENTSECRET" ` + -CloudDir="$tempFolder" ` + -BuildRoot="$buildFolder" ` + -BuildVersion="$buildVersionString" ` + -AppLaunch="$executableName" ` + -AppArgs="" ` # ./dist/win-unpacked env: From 05b5bb24a380eadee464aefe72e7540d96065a9f Mon Sep 17 00:00:00 2001 From: insomnious Date: Thu, 25 Jan 2024 15:26:42 +0000 Subject: [PATCH 5/6] updated package action --- .github/workflows/package.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 689d43da9..36037c264 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -94,6 +94,11 @@ jobs: id: codesign shell: pwsh run: .\download-codesigntool.ps1 + + - name: Download BuildPatchTool + id: buildpatch + shell: pwsh + run: .\download-buildpatchtool.ps1 - name: Use Node.js uses: actions/setup-node@v3 @@ -170,6 +175,49 @@ jobs: shell: pwsh run: | echo "${{ steps.setOutputs.outputs.epicBuildString }}" + + $rootDir = Resolve-Path "." + $extractFolder = Join-Path $rootDir "BuildPatchTool" + $binaryPath = Join-Path $extractFolder "Engine/Binaries/Win64/BuildPatchTool.exe" + $tempFolderName = "EPIC_TEMP" + $tempFolder = Join-Path $rootDir $tempFolderName + $buildFolder = Join-Path $rootDir "dist\win-unpacked" + + $executableName = "Vortex.exe" + $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" + + Write-Output "rootDir $rootDir" + Write-Output "extractFolder $extractFolder" + Write-Output "binaryPath $binaryPath" + Write-Output "tempFolder $tempFolder" + Write-Output "buildFolder $buildFolder" + + if (Test-Path -Path $buildFolder) { + Write-Output "$buildFolder folder exists" + } else { + Write-Output "$buildFolder folder not found" + Exit 1 + } + + & $binaryPath -mode="UploadBinary" ` + -OrganizationId="$EPIC_ORGID" ` + -ProductId="$EPIC_PRODUCTID" ` + -ArtifactId="$EPIC_ARTIFACTID" ` + -ClientId="$EPIC_CLIENTID" ` + -ClientSecret="$EPIC_CLIENTSECRET" ` + -CloudDir="$tempFolder" ` + -BuildRoot="$buildFolder" ` + -BuildVersion="$buildVersionString" ` + -AppLaunch="$executableName" ` + -AppArgs="" ` + + # ./dist/win-unpacked + env: + EPIC_ORGID: ${{ secrets.EPIC_ORGID }} + EPIC_PRODUCTID: ${{ secrets.EPIC_PRODUCTID }} + EPIC_ARTIFACTID: ${{ secrets.EPIC_ARTIFACTID }} + EPIC_CLIENTID: ${{ secrets.EPIC_CLIENTID }} + EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }} - name: Create Unpacked Artifact uses: actions/upload-artifact@v3 From 55bbf5d14a98390e32c3830d75fc2d9247b64580 Mon Sep 17 00:00:00 2001 From: insomnious Date: Thu, 25 Jan 2024 16:17:25 +0000 Subject: [PATCH 6/6] updated secrets --- .github/workflows/package.yml | 13 +++++++------ .github/workflows/test.yml | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 36037c264..7d4d72c0b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -182,9 +182,10 @@ jobs: $tempFolderName = "EPIC_TEMP" $tempFolder = Join-Path $rootDir $tempFolderName $buildFolder = Join-Path $rootDir "dist\win-unpacked" + $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" $executableName = "Vortex.exe" - $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" + $buildVersionString = "${{ steps.setOutputs.outputs.rawVersion }}+${timestamp}" Write-Output "rootDir $rootDir" Write-Output "extractFolder $extractFolder" @@ -200,11 +201,11 @@ jobs: } & $binaryPath -mode="UploadBinary" ` - -OrganizationId="$EPIC_ORGID" ` - -ProductId="$EPIC_PRODUCTID" ` - -ArtifactId="$EPIC_ARTIFACTID" ` - -ClientId="$EPIC_CLIENTID" ` - -ClientSecret="$EPIC_CLIENTSECRET" ` + -OrganizationId="$env:EPIC_ORGID" ` + -ProductId="$env:EPIC_PRODUCTID" ` + -ArtifactId="$env:EPIC_ARTIFACTID" ` + -ClientId="$env:EPIC_CLIENTID" ` + -ClientSecret="$env:EPIC_CLIENTSECRET" ` -CloudDir="$tempFolder" ` -BuildRoot="$buildFolder" ` -BuildVersion="$buildVersionString" ` diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0bb9d43d..8a355587d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,6 +84,14 @@ jobs: with: submodules: "recursive" + - name: Create Temp Unpacked Folder + id: create-temp-folder + shell: pwsh + run: | + $rootDir = Resolve-Path "." + $buildFolder = Join-Path $rootDir "dist\win-unpacked" + New-Item -Path $buildFolder -Type Directory -Force + - name: Download BuildPatchTool id: buildpatch shell: pwsh @@ -101,9 +109,10 @@ jobs: $tempFolderName = "EPIC_TEMP" $tempFolder = Join-Path $rootDir $tempFolderName $buildFolder = Join-Path $rootDir "dist\win-unpacked" + $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" $executableName = "Vortex.exe" - $buildVersionString = "${{ steps.setOutputs.outputs.epicBuildString }}" + $buildVersionString = "${{ steps.setOutputs.outputs.rawVersion }}+${timestamp}" Write-Output "rootDir $rootDir" Write-Output "extractFolder $extractFolder" @@ -119,11 +128,11 @@ jobs: } & $binaryPath -mode="UploadBinary" ` - -OrganizationId="$EPIC_ORGID" ` - -ProductId="$EPIC_PRODUCTID" ` - -ArtifactId="$EPIC_ARTIFACTID" ` - -ClientId="$EPIC_CLIENTID" ` - -ClientSecret="$EPIC_CLIENTSECRET" ` + -OrganizationId="$env:EPIC_ORGID" ` + -ProductId="$env:EPIC_PRODUCTID" ` + -ArtifactId="$env:EPIC_ARTIFACTID" ` + -ClientId="$env:EPIC_CLIENTID" ` + -ClientSecret="$env:EPIC_CLIENTSECRET" ` -CloudDir="$tempFolder" ` -BuildRoot="$buildFolder" ` -BuildVersion="$buildVersionString" `