Skip to content

Test

Test #2

Workflow file for this run

name: Test
on:
workflow_dispatch:
inputs:
version:
description: "The version to release (eg: 'v1.0.0')"
required: true
type: string
create-artifacts:
description: "Create artifacts?"
required: true
type: boolean
default: true
use-new-codesign:
description: "Use new codesign cert?"
required: false
type: boolean
default: true
deploy-epic:
description: "Deploy to Epic?"
required: false
type: boolean
default: false
release:
description: "Create a draft release?"
required: false
type: boolean
default: true
env:
SigningCertificate: cert.pfx
jobs:
build:
runs-on: windows-latest
env:
ES_USERNAME: ${{ secrets.ES_USERNAME }}
ES_PASSWORD: ${{ secrets.ES_PASSWORD }}
ES_CREDENTIAL_ID: ${{ secrets.ES_CREDENTIAL_ID }}
ES_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # Allows AddPAth and SetEnv commands
CERT_PATH: Release
DEBUG: electron-builder # gives electron more verbose logs
strategy:
matrix:
dotnet-version: [ 6.0.x ]
steps:
- name: Show Inputs
run: echo "${{ toJSON(github.event.inputs) }}"
- name: Set Outputs
id: setOutputs
shell: pwsh
env:
InputVersion: ${{ inputs.version }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: |
$tagVersion = $env:InputVersion.StartsWith('v') ? $env:InputVersion : "v" + $env:InputVersion
$rawVersion = $env:InputVersion.StartsWith('v') ? $env:InputVersion.Substring(1) : $env:InputVersion
$validation = [System.Version]::Parse($rawVersion)
echo "tagVersion=$tagVersion" >> $env:GITHUB_OUTPUT
echo "rawVersion=$rawVersion" >> $env:GITHUB_OUTPUT
echo "artifactNameUnpacked=vortex-setup-$rawVersion-unpacked" >> $env:GITHUB_OUTPUT
echo "artifactNameInstaller=vortex-setup-$rawVersion-installer" >> $env:GITHUB_OUTPUT
echo "epicBuildString=$rawVersion+$env:GITHUB_RUN_NUMBER" >> $env:GITHUB_OUTPUT
echo "epicBuildString=$rawVersion+$env:GITHUB_RUN_NUMBER"
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: 'YYYY-MM-DD HHmm'
- name: Use current time
env:
TIME: "${{ steps.current-time.outputs.time }}"
R_TIME: "${{ steps.current-time.outputs.readableTime }}"
F_TIME: "${{ steps.current-time.outputs.formattedTime }}"
YEAR: "${{ steps.current-time.outputs.year }}"
DAY: "${{ steps.current-time.outputs.day }}"
run: echo $TIME $R_TIME $F_TIME $YEAR $DAY
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Download BuildPatchTool
id: buildpatch
shell: pwsh
run: .\download-buildpatchtool.ps1
- 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 }}
EPIC_PRODUCTID: ${{ secrets.EPIC_PRODUCTID }}
EPIC_ARTIFACTID: ${{ secrets.EPIC_ARTIFACTID }}
EPIC_CLIENTID: ${{ secrets.EPIC_CLIENTID }}
EPIC_CLIENTSECRET: ${{ secrets.EPIC_CLIENTSECRET }}