Skip to content

added:release workflows/release.yml #22

added:release workflows/release.yml

added:release workflows/release.yml #22

Workflow file for this run

name: windows build workflows
on:
push:
branches:
- 'develop'
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
configuration: [Debug ,Release]
platform: [x86 ,x64]
runs-on: windows-latest
steps:
- name: Checkout main repository code
uses: actions/checkout@v4
with:
ref: 'develop'
- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
repository: libxengine/libxengine
path: xengine
- name: sub module checkout (opensource)
run: |
git submodule init
git submodule update
shell: pwsh
- name: Set up Dependency x86_64 Environment
if: matrix.platform == 'x64'
run: |
echo "XENGINE_INCLUDE=${{ github.workspace }}/libxengine" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Set up Dependency x86_32 Environment
if: matrix.platform == 'x86'
run: |
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
$latest_tag = $response.tag_name
Write-Host "Latest Tag: $latest_tag"
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_x86-32.zip"
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_x86-32.zip"
Expand-Archive -Path ./XEngine_Windows_x86-32.zip -DestinationPath ./XEngine_Windows -Force
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build Solution
run: msbuild XEngine_Source/XEngine_StorageApp.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
- name: Conditional Step for x86 Release
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
run: |
cp -r XEngine_Source/Release/*.dll XEngine_Release/
cp -r XEngine_Source/Release/*.exe XEngine_Release/
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
cd XEngine_Release
./VSCopy_x86.bat
./XEngine_StorageApp.exe -t
shell: pwsh
- name: Conditional Step for x86 Debug
if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
run: |
cp -r XEngine_Source/Debug/*.dll XEngine_Release/
cp -r XEngine_Source/Debug/*.exe XEngine_Release/
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
cd XEngine_Release
./VSCopy_x86.bat
./XEngine_StorageApp.exe -t
shell: pwsh
- name: Upload folder as artifact with x86
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
uses: actions/upload-artifact@v4
with:
name: XEngine_StorageApp-x86_32-Windows
path: XEngine_Release/
- name: Upload folder as artifact with x64
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
uses: actions/upload-artifact@v4
with:
name: XEngine_StorageApp-x86_64-Windows
path: XEngine_Release/