Skip to content

Commit

Permalink
Добавление автоматической сборки
Browse files Browse the repository at this point in the history
  • Loading branch information
MahBoiDeveloper committed Mar 26, 2024
1 parent 1a489f8 commit cc37173
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Project

# Workflow will trigger on any push to the master/main branch
on:
push:
branches:
- master
- main

jobs:
Build:
# Building server
runs-on: windows-2022
# Commands to complete task
steps:

# Cloning all repository
- name: Get Sources
uses: actions/checkout@v4

# Compile it via shitty .bat file
- name: Compile Project
shell: cmd
run: zBuild.bat

# Upload artifact to the GitHub
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: TSTW_RU-${{github.sha}}
path: Build/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# В папке должна содержаться актуальная версия мода, чтобы на него можно было накатить изменения для тестирования
_Test
Build
Binary file removed Source/Resources/Translations/ru/MIX/ecache98.mix
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions zBuild.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@echo off
chcp 65001 > nul
set mixfolder=Build\Resources\Translations\ru\MIX

echo Delete build cache...
rmdir /q /s Build > nul 2> nul
mkdir Build

echo Copy files...
xcopy Source\* Build\* /e /y

for /f "tokens=*" %%f in ('dir "%mixfolder%\" /a:d /b') do (
echo Compiling %%f.mix...
Tools\ccmix.exe --create --lmd --game=ra2 --dir "%mixfolder%\%%f" --mix "%mixfolder%\%%f.mix"
rmdir /q /s "%mixfolder%\%%f"
)

echo Done. Please, check Build folder.

0 comments on commit cc37173

Please sign in to comment.