Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test.yml #15183

Merged
merged 6 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
58 changes: 47 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Package
name: Test

on:
workflow_dispatch:
Expand Down Expand Up @@ -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 }}
EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }}
Loading