2021-10-15 11:40:57 +00:00
|
|
|
name: pboProject
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request_target:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pboproject:
|
2023-04-30 21:53:43 +00:00
|
|
|
runs-on: windows-2022
|
2021-10-15 11:40:57 +00:00
|
|
|
steps:
|
|
|
|
- name: Install Arma 3 Tools
|
|
|
|
uses: arma-actions/arma3-tools@master
|
|
|
|
with:
|
|
|
|
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
|
|
|
|
- name: Install Mikero Tools
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: arma-actions/mikero-tools@2023-01-04
|
2021-10-15 11:40:57 +00:00
|
|
|
- name: Download game data
|
|
|
|
run: |
|
|
|
|
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
|
|
|
|
Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip
|
|
|
|
Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip
|
|
|
|
Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip
|
|
|
|
Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip
|
|
|
|
$files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip")
|
|
|
|
ForEach ($file in $files) {
|
|
|
|
Extract-7Zip -Path $file -DestinationPath .
|
|
|
|
Remove-Item $file
|
|
|
|
}
|
|
|
|
env:
|
|
|
|
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
|
|
|
|
RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }}
|
|
|
|
RHSGREF_URL: ${{ secrets.RHSGREF_URL }}
|
|
|
|
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
|
|
|
|
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
|
|
|
|
- name: Checkout CBA A3
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-10-15 11:40:57 +00:00
|
|
|
with:
|
|
|
|
path: x\cba
|
|
|
|
ref: master
|
|
|
|
repository: CBATeam/CBA_A3.git
|
|
|
|
- name: Checkout ACE3
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-10-15 11:40:57 +00:00
|
|
|
with:
|
|
|
|
path: z\ace
|
|
|
|
persist-credentials: false
|
|
|
|
- name: Checkout pull request
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-10-15 11:40:57 +00:00
|
|
|
if: ${{ github.event_name == 'pull_request_target' }}
|
|
|
|
with:
|
|
|
|
path: pullrequest
|
|
|
|
ref: 'refs/pull/${{ github.event.number }}/merge'
|
|
|
|
- name: Replace addons with pull request addons
|
|
|
|
if: ${{ github.event_name == 'pull_request_target' }}
|
|
|
|
run: |
|
|
|
|
rm -r z\ace\addons\
|
|
|
|
rm -r z\ace\optionals\
|
2022-08-17 11:01:08 +00:00
|
|
|
rm -r z\ace\tools\pDummies\
|
2021-10-15 11:40:57 +00:00
|
|
|
xcopy /e /h /q pullrequest\addons z\ace\addons\
|
|
|
|
xcopy /e /h /q pullrequest\optionals z\ace\optionals\
|
2022-08-17 11:01:08 +00:00
|
|
|
xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\
|
2021-10-15 11:40:57 +00:00
|
|
|
- name: Setup build environment
|
|
|
|
run: |
|
|
|
|
subst P: .
|
|
|
|
pboproject -P
|
|
|
|
xcopy /e /h /q z\ace\tools\pDummies\A3\ui_f_enoch a3\ui_f_enoch\
|
|
|
|
xcopy /e /h /q z\ace\tools\pDummies\gm gm\
|
|
|
|
xcopy /e /h /q z\ace\tools\pDummies\vn vn\
|
|
|
|
- name: Build
|
|
|
|
run: py P:\z\ace\tools\make.py ci
|
|
|
|
env:
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
- name: Archive logs
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-10-15 11:40:57 +00:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: logs
|
|
|
|
path: temp/*.log
|
|
|
|
- name: Archive @ace
|
2023-04-30 21:53:43 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-10-15 11:40:57 +00:00
|
|
|
with:
|
|
|
|
name: '@ace3-${{ github.sha }}'
|
|
|
|
path: z\ace\release\@ace
|