Skip to content

Further optimizations for province automapping #120

Further optimizations for province automapping

Further optimizations for province automapping #120

name: Build and publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_local:
name: Build and publish local
if: github.repository_owner == 'ParadoxGameConverters'
runs-on: [self-hosted, windows]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- 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\ProvinceMapper.sln
- name: "Prepare release"
if: ${{ github.event_name == 'push' }}
run: |
cd "C:\Program Files\7-Zip\"
.\7z.exe a $Env:GITHUB_WORKSPACE\ProvinceMapper-0.10YardsRelease.zip $Env:GITHUB_WORKSPACE\Release\*
- 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: ProvinceMapper-0.10YardsRelease.zip
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: "Cleanup"
if: always()
run: |
Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -Force | Remove-Item -force -recurse
build_foreign:
name: Build foreign
if: github.repository_owner != 'ParadoxGameConverters'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- 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\ProvinceMapper.sln