| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- name: Compile and Update Compiled Client
- on:
- push:
- branches:
- - master # Trigger on push to master branch
- jobs:
- compile-and-push:
- runs-on: ubuntu-latest
- steps:
- - name: Install dependencies
- run: sudo apt-get install -y python3-paramiko python3-lxml
- - name: Checkout Source Repo (Civ14)
- uses: actions/checkout@v3.6.0
- with:
- submodules: "recursive"
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v3.2.0
- with:
- dotnet-version: 9.0.x
- - name: Setup Submodule
- run: |
- git submodule update --init --recursive
- - name: Pull engine updates
- uses: space-wizards/submodule-dependency@v0.1.5
- - name: Update Engine Submodules
- run: |
- cd RobustToolbox/
- git submodule update --init --recursive
- - name: Install dependencies
- run: dotnet restore
- - name: Package Client
- run: dotnet build -c Release -r win-x64 Content.Client
- - name: Package Server
- run: dotnet build -c Release -r win-x64 Content.Server
- - name: Checkout Target Repo (Compiled Client)
- uses: actions/checkout@v4
- with:
- repository: taislin/civ14_compileds
- token: ${{ secrets.TARGET_REPO_TOKEN }}
- path: target-repo
- - name: Update Target Repo
- run: |
- # Copy compiled output to target-repo/
- rsync -av --update ./bin/Content.Client/win-x64/ target-repo/Content.Client/ || true
- cd target-repo
- cd Content.Client
- git config user.name "GitHub Action"
- git config user.email "action@github.com"
- git add .
- git commit -m "Update compiled client from Civ14"
- git push
- cd -
- # Copy compiled output to target-repo/
- rsync -av --update ./../bin/Content.Server/win-x64/ Content.Server/ || true
- cd Content.Server
- git config user.name "GitHub Action"
- git config user.email "action@github.com"
- git add .
- git commit -m "Update compiled server from Civ14"
- git push
|