diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 689d43da9..7d4d72c0b 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,50 @@ 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" + $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" + + $executableName = "Vortex.exe" + $buildVersionString = "${{ steps.setOutputs.outputs.rawVersion }}+${timestamp}" + + 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="$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" ` + -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcbec98ba..8a355587d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Package +name: Test on: workflow_dispatch: @@ -84,29 +84,65 @@ 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 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" + $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.rawVersion }}+${timestamp}" + + 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="$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" ` + -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 }} \ No newline at end of file + EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }}