Update push.yml #424
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main Workflow | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
if: "contains(github.event.head_commit.message, '[ci build]')" | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
Configuration: [Debug, Release] | |
Platform: [x64] | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Update DirectX Components | |
run: | | |
${{ github.workspace }}/Update_DirectX_Components.cmd | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: MSBuild | |
shell: cmd | |
run: | | |
set APPVEYOR_BUILD_VERSION=2.1.${{ github.run_number }} | |
set APPVEYOR_REPO_NAME=${{ github.repository }} | |
msbuild Engine.sln /t:Rebuild /p:Configuration=${{ matrix.Configuration }} /p:Platform=${{ matrix.Platform }} | |
- name: Prepare artifacts | |
shell: cmd | |
run: | | |
set APPVEYOR_BUILD_VERSION=2.1.${{ github.run_number }} | |
set CONFIGURATION=${{ matrix.Configuration }} | |
set PLATFORM=${{ matrix.Platform }} | |
set OGSR_ARTIFACT_NAME=OGSR_Engine_SHOC_EDITION_%PLATFORM%_%APPVEYOR_BUILD_VERSION%_%CONFIGURATION%.7z | |
cd bin_%PLATFORM% | |
md ..\Game\Resources_SoC_1.0006\bin_%PLATFORM% | |
del *.ico | |
copy *.* ..\Game\Resources_SoC_1.0006\bin_%PLATFORM% | |
cd ..\Game\Resources_SoC_1.0006 | |
7z a -t7z -m0=LZMA2:d=96m:fb=273 -mx=9 -mmt=2 ..\..\%OGSR_ARTIFACT_NAME% .\ | |
- name: Upload OGSR artifact | |
uses: actions/upload-artifact@v4.3.3 | |
with: | |
name: OGSR_Engine_SHOC_EDITION_${{ matrix.Platform }}_2.1.${{ github.run_number }}_${{ matrix.Configuration }}.7z | |
path: .\OGSR_Engine_SHOC_EDITION_${{ matrix.Platform }}_2.1.${{ github.run_number }}_${{ matrix.Configuration }}.7z | |
- name: Upload release asset | |
if: github.event_name == 'release' | |
uses: Czuz/upload-release-asset@v1.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: .\OGSR_Engine_SHOC_EDITION_${{ matrix.Platform }}_2.1.${{ github.run_number }}_${{ matrix.Configuration }}.7z | |
asset_name: OGSR_Engine_SHOC_EDITION_${{ matrix.Platform }}_2.1.${{ github.run_number }}_${{ matrix.Configuration }}.7z | |
asset_content_type: application/zip |