@@ -55,10 +55,12 @@ jobs:
5555 $currentPath = "${{ github.workspace }}"
5656 $prefixPath = Join-Path -Path $currentPath -ChildPath 'GameFiles'
5757 $subdirectory = Get-ChildItem -Path $prefixPath -Directory | Select-Object -First 1 -ExpandProperty Name
58+ $version = [regex]::Match($subdirectory, '(?<=\d+\.\d+\.\d+-).+$').Value
5859 $fullPath = Join-Path -Path $prefixPath -ChildPath $subdirectory
5960 $currentDirName = Split-Path -Path $currentPath -Leaf
6061 echo "currentDirName=$currentDirName" >> $env:GITHUB_ENV
6162 echo "fullPath=$fullPath" >> $env:GITHUB_ENV
63+ echo "GameVersion=$version" >> $env:GITHUB_ENV
6264 shell : pwsh
6365
6466 - name : Build Project
@@ -67,18 +69,22 @@ jobs:
6769 - name : Find zip file
6870 id : find-zip
6971 run : |
70- $prefixPath = "${{ github.workspace }}\${{ env.currentDirName }}\Out"
71- $zipFile = Get-ChildItem -Path $prefixPath -Recurse -Filter "*.zip" | Select-Object -First 1 -ExpandProperty BaseName
72+ $prefixPath = "${{ github.workspace }}"
73+ $zipFileObject = Get-ChildItem -Recurse -Path $prefixPath -Filter "*.zip" | Select-Object -First 1
74+ $zipFile = $zipFileObject.BaseName
75+ $zipFilePath = (Get-Item $zipFileObject.FullName).Directory.FullName
7276 echo "zipFile=$zipFile" >> $env:GITHUB_ENV
77+ echo "zipFilePath=$zipFilePath" >> $env:GITHUB_ENV
7378 shell : pwsh
7479
7580 - name : Upload build artifacts
7681 uses : actions/upload-artifact@v4
7782 with :
7883 name : ${{ env.zipFile }}
79- path : ${{ github.workspace }}\${{ env.currentDirName }}\Out \Bin
84+ path : ${{ env.zipFilePath }}\Bin
8085
8186 - name : Create Release
8287 uses : ncipollo/release-action@v1
8388 with :
84- artifacts : ${{ github.workspace }}\${{ env.currentDirName }}\Out\*.zip
89+ artifacts : ${{ env.zipFilePath }}\*.zip
90+ name : ${{ env.ZipFile }} built for Game Version ${{ env.GameVersion }}
0 commit comments