upload-client.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Compile and Update Compiled Client
  2. on:
  3. push:
  4. branches:
  5. - master # Trigger on push to master branch
  6. jobs:
  7. compile-and-push:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Install dependencies
  11. run: sudo apt-get install -y python3-paramiko python3-lxml
  12. - name: Checkout Source Repo (Civ14)
  13. uses: actions/checkout@v3.6.0
  14. with:
  15. submodules: "recursive"
  16. - name: Setup .NET Core
  17. uses: actions/setup-dotnet@v3.2.0
  18. with:
  19. dotnet-version: 9.0.x
  20. - name: Setup Submodule
  21. run: |
  22. git submodule update --init --recursive
  23. - name: Pull engine updates
  24. uses: space-wizards/submodule-dependency@v0.1.5
  25. - name: Update Engine Submodules
  26. run: |
  27. cd RobustToolbox/
  28. git submodule update --init --recursive
  29. - name: Install dependencies
  30. run: dotnet restore
  31. - name: Package Client
  32. run: dotnet build -c Release -r win-x64 Content.Client
  33. - name: Checkout Target Repo (Compiled Client)
  34. uses: actions/checkout@v4
  35. with:
  36. repository: taislin/civ14_compiled_client
  37. token: ${{ secrets.TARGET_REPO_TOKEN }}
  38. path: target-repo
  39. - name: Debug Build Output
  40. run: |
  41. echo "Current directory: $(pwd)"
  42. ls -la
  43. find . -type d -name "bin" # Find all 'bin' directories
  44. find . -type f -name "*.dll" # Find compiled DLLs
  45. find . -type f -name "*.exe" # Find compiled EXEs
  46. ls -la ./bin/Content.Client/ || echo "Directory not found"
  47. - name: Update Target Repo
  48. run: |
  49. # Copy compiled output to target-repo/
  50. rsync -av --ignore-existing ./bin/Content.Client/win-x64/ target-repo/ || true
  51. cd target-repo
  52. git config user.name "GitHub Action"
  53. git config user.email "action@github.com"
  54. git add .
  55. if git status --porcelain | grep .; then
  56. git commit -m "Update compiled client from Civ14 - changed files only"
  57. git push
  58. else
  59. echo "No changes detected, skipping commit and push"
  60. fi