feat: cleaned up workflow & fix xbox360 output paths

This commit is contained in:
2026-08-02 14:50:13 -04:00
parent f17ce45d6d
commit 5febd74496
3 changed files with 48 additions and 16 deletions
+34 -15
View File
@@ -24,12 +24,13 @@ jobs:
}
build:
needs: validate
runs-on: windows-2022
strategy:
matrix:
configuration: [Release]
platform: [PS3, Windows64] #[PS3, PSVita, Xbox 360, ORBIS, Windows64]
platform: [PS3, Windows64, Orbis] #[PS3, PSVita, Xbox360, ORBIS, Windows64]
steps:
- name: Checkout Repository
@@ -37,28 +38,41 @@ jobs:
- name: Build Cafeberry
run: |
$platform = if ("${{ matrix.platform }}" -eq "Xbox360") { "Xbox 360" } elseif ("${{ matrix.platform }}" -eq "Orbis") { "ORBIS" } else { "${{ matrix.platform }}" }
& "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" MinecraftConsoles.sln `
/p:Configuration=${{ matrix.configuration }} `
/p:Platform=${{ matrix.platform }} `
"/p:Platform=$platform" `
/m
- name: Zip Build (Consoles)
if: matrix.platform != 'Windows64'
run: 7z a -r LCE${{ matrix.platform }}.zip ./${{ matrix.platform }}_${{ matrix.configuration }}/* "-x!*.ipdb" "-x!*.iobj"
- name: Zip Build (Windows64)
if: matrix.platform == 'Windows64'
run: 7z a -r LCE${{ matrix.platform }}.zip ./x64/${{ matrix.configuration }}/* "-x!*.ipdb" "-x!*.iobj"
- name: Zip Build
run: |
if ("${{ matrix.platform }}" -eq "Windows64") {
7z a -r "LCEWindows64.zip" "./x64/${{ matrix.configuration }}/*" "-x!*.pdb" "-x!*.pch" "-x!*.ilk"
} elseif ("${{ matrix.platform }}" -eq "Orbis") {
7z a -r "LCEOrbis.zip" "./ORBIS_${{ matrix.configuration }}/PS4_GAME/*"
} elseif ("${{ matrix.platform }}" -eq "PSVita") {
7z a -r "LCEPSVita.zip" "./PSVita_${{ matrix.configuration }}/PSVITA_GAME/*"
} elseif ("${{ matrix.platform }}" -eq "PS3") {
7z a -r "LCEPS3.zip" "./PS3_${{ matrix.configuration }}/PS3_GAME/*"
} elseif ("${{ matrix.platform }}" -eq "Xbox360") {
7z a -r "LCEXbox360.zip" "./X360_${{ matrix.configuration }}/*" "-x!*.pdb" "-x!*.pch" "-x!*.xdb"
} else {
7z a -r "LCE${{ matrix.platform }}.zip" "./${{ matrix.platform }}/${{ matrix.configuration }}/*" "-x!*.ipdb" "-x!*.iobj" "-x!*.pdb" "-x!*.pch" "-x!*.ilk"
}
- name: Stage artifacts
run: |
New-Item -ItemType Directory -Force -Path staging
Copy-Item LCE${{ matrix.platform }}.zip staging/
Copy-Item "LCE${{ matrix.platform }}.zip" staging/
- name: Stage exe
if: matrix.platform == 'Windows64'
run: |
Copy-Item ./x64/${{ matrix.configuration }}/Minecraft.Client.exe staging/
if ("${{ matrix.platform }}" -eq "Windows64") {
Copy-Item "./x64/${{ matrix.configuration }}/Minecraft.Client.exe" staging/
} elseif ("${{ matrix.platform }}" -eq "PSVita") {
Copy-Item "./PSVita_${{ matrix.configuration }}/Minecraft.Client.vpk" staging/LCEPSVita.vpk
} elseif ("${{ matrix.platform }}" -eq "Orbis") {
Copy-Item "./ORBIS_${{ matrix.configuration }}/Minecraft.Client.pkg" staging/LCEOrbis.pkg
}
- name: Upload artifacts
uses: https://github.com/actions/upload-artifact@v3
@@ -88,9 +102,14 @@ jobs:
} catch {
$body = $fallback
}
} else {
$body = $fallback
}
"description<<EOF`n$body`nEOF" | Out-File -Append -Encoding utf8 -NoNewline:$false $env:GITHUB_OUTPUT
$delimiter = "EOF_$([System.Guid]::NewGuid().ToString('N'))"
"description<<$delimiter" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8NoBOM
$body | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8NoBOM
"$delimiter" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8NoBOM
- name: Publish Release
uses: akkuman/gitea-release-action@v1