Skip to content

Assign unassigned provinces to surrounding strategic regions. #1027

Assign unassigned provinces to surrounding strategic regions.

Assign unassigned provinces to surrounding strategic regions. #1027

name: Build, test and publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_test_and_publish:
name: Build, test and publish local
if: github.repository_owner == 'ParadoxGameConverters'
runs-on: [self-hosted, windows]
steps:
- name: "Cloning repo"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: "Cloning selective submodules"
run: |
git submodule update --init --recursive external\common_items
git -c submodule."external/commonItems".update=none `
submodule update --init --recursive external\Fronter
- name: "Get previous tag"
if: ${{ github.event_name == 'push' }}
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: "Build solution"
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\"
.\MSBuild.exe -m -p:Configuration=Release $Env:GITHUB_WORKSPACE\Vic2ToHoI4.sln
- name: "Run tests"
run: |
cd $Env:GITHUB_WORKSPACE\build\tests\Release
.\Vic2ToHoI4Tests.exe
- name: "Prepare release"
run: |
cd "C:\Program Files\7-Zip\"
.\7z.exe a $Env:GITHUB_WORKSPACE\Vic2ToHoI4-1.0Rommel-win-x64.zip $Env:GITHUB_WORKSPACE\build\Release\*
- name: "Prepare installer"
run: |
c:\"Program Files (x86)\Inno Setup 6\iscc" Vic2ToHoI4-Installer.iss
cp $Env:GITHUB_WORKSPACE\Output\Vic2ToHoI4-latest-win-x64.exe $Env:GITHUB_WORKSPACE\Output\Vic2ToHoI4-1.0Rommel-win-x64.exe
- name: "Upload binaries to release"
if: ${{ github.event_name == 'push' }}
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.previoustag.outputs.tag }}
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
artifacts: Vic2ToHoI4-1.0Rommel-win-x64.zip, Output\Vic2ToHoI4-1.0Rommel-win-x64.exe
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: "Prepare pull request artifact"
if: ${{ github.event_name == 'pull_request' }}
run: |
cd "C:\Program Files\7-Zip\"
.\7z.exe a $Env:GITHUB_WORKSPACE\Vic3ToHoI4-pull-request-win-x64.zip $Env:GITHUB_WORKSPACE\build\Release\*
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: pull-request-version
path: Vic3ToHoI4-pull-request-win-x64.zip
- name: "Cleanup"
if: always()
run: |
Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -Force | Remove-Item -force -recurse
build_test:
name: Build and test foreign
if: github.repository_owner != 'ParadoxGameConverters'
runs-on: windows-2022
steps:
- name: "Cloning repo"
uses: actions/checkout@v4
with:
submodules: true
- name: "Cloning selective submodules"
run: |
git submodule update --init --recursive external\common_items
git -c submodule."external/commonItems".update=none `
submodule update --init --recursive external\Fronter
- name: "Build solution"
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe -m -p:Configuration=Release $Env:GITHUB_WORKSPACE\Vic2ToHoI4.sln
- name: "Run tests"
run: |
cd $Env:GITHUB_WORKSPACE\build\tests\Release
.\Vic2ToHoI4Tests.exe
- name: "Prepare pull request artifact"
if: ${{ github.event_name == 'pull_request' }}
run: |
cd "C:\Program Files\7-Zip\"
.\7z.exe a $Env:GITHUB_WORKSPACE\Vic3ToHoI4-pull-request-win-x64.zip $Env:GITHUB_WORKSPACE\build\Release\*
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: pull-request-version
path: Vic3ToHoI4-pull-request-win-x64.zip
- name: "Cleanup"
if: always()
run: |
Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -Force | Remove-Item -force -recurse