Fix bone #526
Workflow file for this run
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: Add-Ons Pack | |
on: [push] | |
env: | |
BUILD_CONFIGURATION: Release | |
FOLDER_NAME: workspace | |
GAME_TITLE: Cold Ice Remastered | |
GAME_FOLDER: ice_beta5 | |
jobs: | |
compile_tools: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.COLDICE_ADD_ONS_PAT }} | |
submodules: recursive | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Write Config File | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}' }" | Add-Content .\${{env.FOLDER_NAME}}\Config.ps1 | |
- name: Compile tools | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
.\${{env.FOLDER_NAME}}\Build-Tools.ps1 -ConfigFile Config | |
[void](New-Item -Force -ItemType Directory $env:TEMP\bin) | |
Copy-Item -Recurse -Force .\bin $env:TEMP | |
Compress-Archive -LiteralPath $env:TEMP\bin -DestinationPath .\tools.zip -Force | |
- name: Upload tools | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compiled_tools | |
path: ./${{env.FOLDER_NAME}}/tools.zip | |
compile_wads: | |
runs-on: windows-latest | |
needs: [compile_tools] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.COLDICE_ADD_ONS_PAT }} | |
submodules: recursive | |
- name: Download tools | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_tools | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack tools | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\tools.zip -DestinationPath $env:TEMP | |
Remove-Item .\${{env.FOLDER_NAME}}\bin\\* -Recurse -Force -ErrorAction Ignore | |
Remove-Item .\${{env.FOLDER_NAME}}\bin -Force -ErrorAction Ignore | |
Move-Item $env:TEMP\bin .\${{env.FOLDER_NAME}} | |
Remove-Item .\${{env.FOLDER_NAME}}\tools.zip -Recurse -Force -ErrorAction Ignore | |
- name: Write Config File | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}' }" | Add-Content .\${{env.FOLDER_NAME}}\Config.ps1 | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}'`r`n'addons' = @('quadfrost','defroster') }" | Add-Content .\${{env.FOLDER_NAME}}\add-ons\Config.ps1 | |
- name: Unpack Add-ons | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: .\${{env.FOLDER_NAME}}\add-ons\Copy-Addons.ps1 -ConfigFile Config | |
- name: Compile Wads | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
.\${{env.FOLDER_NAME}}\Build-Wads.ps1 -Clean -ConfigFile Config | |
Get-ChildItem -Path .\redist\ -Filter *.wad | Copy-Item -Destination $env:TEMP -Force -PassThru | |
Get-ChildItem -Path $env:TEMP -Filter *.wad | Compress-Archive -DestinationPath .\wads.zip -Force | |
- name: Upload Wads | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compiled_wads | |
path: ./${{env.FOLDER_NAME}}/wads.zip | |
compile_addon_maps: | |
runs-on: windows-latest | |
needs: [compile_tools, compile_wads] | |
strategy: | |
matrix: | |
map: [quadfrost, defroster] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.COLDICE_ADD_ONS_PAT }} | |
submodules: recursive | |
- name: Download tools | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_tools | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack tools | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\tools.zip -DestinationPath $env:TEMP | |
Remove-Item .\${{env.FOLDER_NAME}}\bin\\* -Recurse -Force -ErrorAction Ignore | |
Remove-Item .\${{env.FOLDER_NAME}}\bin -Force -ErrorAction Ignore | |
Move-Item $env:TEMP\bin .\${{env.FOLDER_NAME}} | |
Remove-Item .\${{env.FOLDER_NAME}}\tools.zip -Recurse -Force -ErrorAction Ignore | |
- name: Download wads | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_wads | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack wads | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\wads.zip -DestinationPath $env:TEMP | |
Get-ChildItem -Path $env:TEMP -Filter *.wad | Move-Item -Destination .\${{env.FOLDER_NAME}}\wads -Force -PassThru | |
Get-ChildItem -Path $env:TEMP -Filter *.wad | Move-Item -Destination .\${{env.FOLDER_NAME}}\redist -Force -PassThru | |
Remove-Item .\${{env.FOLDER_NAME}}\wads.zip -Recurse -Force -ErrorAction Ignore | |
- name: Write Config File | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}' }" | Add-Content .\${{env.FOLDER_NAME}}\Config.ps1 | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}'`r`n'addons' = @('quadfrost','defroster') }" | Add-Content .\${{env.FOLDER_NAME}}\add-ons\Config.ps1 | |
- name: Unpack Add-ons | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: .\${{env.FOLDER_NAME}}\add-ons\Copy-Addons.ps1 -ConfigFile Config | |
- name: Compile ${{matrix.map}} | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
.\${{env.FOLDER_NAME}}\Build-Maps.ps1 -Clean -ConfigFile Config -Fast -Map ${{matrix.map}} -NoWad | |
[void](New-Item -Force -ItemType Directory $env:TEMP\maps) | |
Copy-Item -Recurse -Force .\redist\maps $env:TEMP | |
Compress-Archive -LiteralPath $env:TEMP\maps -DestinationPath .\${{matrix.map}}.zip -Force | |
- name: Upload ${{matrix.map}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{matrix.map}} | |
path: ./${{env.FOLDER_NAME}}/${{matrix.map}}.zip | |
combine_maps: | |
runs-on: windows-latest | |
needs: [compile_addon_maps] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ./${{env.FOLDER_NAME}} | |
- name: Combine Maps | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
[void](New-Item -Force -ItemType Directory $env:TEMP\maps) | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\quadfrost\quadfrost.zip -DestinationPath $env:TEMP | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\defroster\defroster.zip -DestinationPath $env:TEMP | |
Compress-Archive -LiteralPath $env:TEMP\maps -DestinationPath .\${{env.FOLDER_NAME}}\maps.zip -Force | |
- name: Upload Maps | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compiled_maps | |
path: ./${{env.FOLDER_NAME}}/maps.zip | |
package_addons: | |
runs-on: windows-latest | |
needs: [combine_maps] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.COLDICE_ADD_ONS_PAT }} | |
submodules: recursive | |
- name: Download wads | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_wads | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack wads | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\wads.zip -DestinationPath $env:TEMP | |
Get-ChildItem -Path $env:TEMP -Filter *.wad | Move-Item -Destination .\${{env.FOLDER_NAME}}\redist -Force -PassThru | |
Remove-Item .\${{env.FOLDER_NAME}}\wads.zip -Recurse -Force -ErrorAction Ignore | |
- name: Download maps | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_maps | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack maps | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\maps.zip -DestinationPath $env:TEMP | |
Move-Item $env:TEMP\maps .\${{env.FOLDER_NAME}}\redist | |
Remove-Item .\${{env.FOLDER_NAME}}\maps.zip -Recurse -Force -ErrorAction Ignore | |
- name: Download tools | |
uses: actions/download-artifact@v4 | |
with: | |
name: compiled_tools | |
path: ./${{env.FOLDER_NAME}} | |
- name: Unpack tools | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
Expand-Archive -Path .\${{env.FOLDER_NAME}}\tools.zip -DestinationPath $env:TEMP | |
Remove-Item .\${{env.FOLDER_NAME}}\bin\\* -Recurse -Force -ErrorAction Ignore | |
Remove-Item .\${{env.FOLDER_NAME}}\bin -Force -ErrorAction Ignore | |
Move-Item $env:TEMP\bin .\${{env.FOLDER_NAME}} | |
Remove-Item .\${{env.FOLDER_NAME}}\tools.zip -Recurse -Force -ErrorAction Ignore | |
- name: Write Config File | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
"`$Config = @{ 'projectName' = '${{env.GAME_TITLE}}'`r`n'addons' = @('quadfrost','defroster') }" | Add-Content .\${{env.FOLDER_NAME}}\add-ons\Config.ps1 | |
# Assets found redist/ like map artifacts in overviews/ | |
- name: Unpack Add-ons | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: .\${{env.FOLDER_NAME}}\add-ons\Copy-Addons.ps1 -ConfigFile Config | |
- name: Package Cold Ice Add-Ons | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: .\${{env.FOLDER_NAME}}\add-ons\Build-Addons-${{env.BUILD_CONFIGURATION}}.ps1 -ConfigFile Config | |
- name: Archive Cold Ice Add-Ons ${{env.BUILD_CONFIGURATION}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coldice-addons-build | |
path: .\${{env.FOLDER_NAME}}\add-ons\*-add-on-*.7z | |
if-no-files-found: error |