From 187358ff26e273ad6ebf3906bc74f1ce1d7969d7 Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:47:37 +0200 Subject: [PATCH 1/6] Add build workflow for PRs. --- .github/workflows/build-map-adapter.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-map-adapter.yml diff --git a/.github/workflows/build-map-adapter.yml b/.github/workflows/build-map-adapter.yml new file mode 100644 index 0000000..4933da4 --- /dev/null +++ b/.github/workflows/build-map-adapter.yml @@ -0,0 +1,31 @@ +name: Build War3App.MapAdapter + +on: + pull_request: + branches: ['master'] + workflow_dispatch: + +env: + DOTNET_VERSION: '8.0.x' + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + +jobs: + build-only: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build solution + run: dotnet build War3App.MapAdapter.WinForms.slnf --configuration Release \ No newline at end of file From f8f8b0ad5f3927e7b53dcc6f18e0c1f5f2d4bd10 Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:50:43 +0200 Subject: [PATCH 2/6] Set EnableWindowsTargeting --- .../War3App.MapAdapter.WinForms.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj b/src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj index 16f2ae1..e373511 100644 --- a/src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj +++ b/src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj @@ -1,12 +1,13 @@  + true net6.0-windows 9.0 enable true WinExe - 1.5.0 + 1.5.0 From aa11c52bc2140a4fef15b243606776f7c221bb08 Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:53:04 +0200 Subject: [PATCH 3/6] Now for all csprojs --- src/War3App.Common.WinForms/War3App.Common.WinForms.csproj | 1 + .../War3App.MapGallery.WinForms.csproj | 1 + .../War3App.MapTranspiler.WinForms.csproj | 1 + .../War3App.MapUnlocker.WinForms.csproj | 5 +++-- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/War3App.Common.WinForms/War3App.Common.WinForms.csproj b/src/War3App.Common.WinForms/War3App.Common.WinForms.csproj index 5406822..f6314fc 100644 --- a/src/War3App.Common.WinForms/War3App.Common.WinForms.csproj +++ b/src/War3App.Common.WinForms/War3App.Common.WinForms.csproj @@ -1,6 +1,7 @@ + true net6.0-windows true diff --git a/src/War3App.MapGallery.WinForms/War3App.MapGallery.WinForms.csproj b/src/War3App.MapGallery.WinForms/War3App.MapGallery.WinForms.csproj index 2d0a4fd..a0a6ddc 100644 --- a/src/War3App.MapGallery.WinForms/War3App.MapGallery.WinForms.csproj +++ b/src/War3App.MapGallery.WinForms/War3App.MapGallery.WinForms.csproj @@ -1,6 +1,7 @@ + true net6.0-windows true WinExe diff --git a/src/War3App.MapTranspiler.WinForms/War3App.MapTranspiler.WinForms.csproj b/src/War3App.MapTranspiler.WinForms/War3App.MapTranspiler.WinForms.csproj index 6692db1..7e03b78 100644 --- a/src/War3App.MapTranspiler.WinForms/War3App.MapTranspiler.WinForms.csproj +++ b/src/War3App.MapTranspiler.WinForms/War3App.MapTranspiler.WinForms.csproj @@ -1,6 +1,7 @@ + true net6.0-windows true WinExe diff --git a/src/War3App.MapUnlocker.WinForms/War3App.MapUnlocker.WinForms.csproj b/src/War3App.MapUnlocker.WinForms/War3App.MapUnlocker.WinForms.csproj index d67295c..d9dd6e9 100644 --- a/src/War3App.MapUnlocker.WinForms/War3App.MapUnlocker.WinForms.csproj +++ b/src/War3App.MapUnlocker.WinForms/War3App.MapUnlocker.WinForms.csproj @@ -1,9 +1,10 @@  - WinExe - net5.0-windows + true + net6.0-windows true + WinExe From a3ebf8e72590284effbaee2ea8d1d3849672c016 Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 13:07:37 +0200 Subject: [PATCH 4/6] Add publish workflow --- .github/workflows/build-map-adapter.yml | 2 +- .github/workflows/publish-map-adapter.yml | 46 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-map-adapter.yml diff --git a/.github/workflows/build-map-adapter.yml b/.github/workflows/build-map-adapter.yml index 4933da4..25eabc6 100644 --- a/.github/workflows/build-map-adapter.yml +++ b/.github/workflows/build-map-adapter.yml @@ -28,4 +28,4 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build solution - run: dotnet build War3App.MapAdapter.WinForms.slnf --configuration Release \ No newline at end of file + run: dotnet build War3App.MapAdapter.WinForms.slnf -c Release \ No newline at end of file diff --git a/.github/workflows/publish-map-adapter.yml b/.github/workflows/publish-map-adapter.yml new file mode 100644 index 0000000..8a7ab8b --- /dev/null +++ b/.github/workflows/publish-map-adapter.yml @@ -0,0 +1,46 @@ +name: Publish War3App.MapAdapter + +on: + workflow_dispatch: + +env: + DOTNET_VERSION: '8.0.x' + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Publish project + run: dotnet publish src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj -c Release -o ./artifacts/map-adapter + + - name: Create zip + run: cd ./artifacts/map-adapter && zip -r ../MapAdapter.zip . + + - name: Get version from csproj + run: | + VERSION=$(grep '' src/War3App.MapAdapter.WinForms/War3App.MapAdapter.WinForms.csproj | cut -d'>' -f2 | cut -d'<' -f1) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2.3.2 + with: + name: War3App.MapAdapter v${{ env.VERSION }} + tag_name: mapadapter-v${{ env.VERSION }} + files: | + ./artifacts/MapAdapter.zip + draft: ${{ github.ref_name != 'master' }} \ No newline at end of file From c72ba72b6d7c808c59038f80bc0667a4ec132ff6 Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 13:08:37 +0200 Subject: [PATCH 5/6] Temporary --- .github/workflows/publish-map-adapter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-map-adapter.yml b/.github/workflows/publish-map-adapter.yml index 8a7ab8b..2fc5052 100644 --- a/.github/workflows/publish-map-adapter.yml +++ b/.github/workflows/publish-map-adapter.yml @@ -1,6 +1,8 @@ name: Publish War3App.MapAdapter on: + pull_request: + branches: ['master'] workflow_dispatch: env: From 2db9644de5df5071431ef46e45bb91ca570d2bab Mon Sep 17 00:00:00 2001 From: Drake53 <49623303+Drake53@users.noreply.github.com> Date: Sat, 6 Sep 2025 13:10:22 +0200 Subject: [PATCH 6/6] Revert --- .github/workflows/publish-map-adapter.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish-map-adapter.yml b/.github/workflows/publish-map-adapter.yml index 2fc5052..8a7ab8b 100644 --- a/.github/workflows/publish-map-adapter.yml +++ b/.github/workflows/publish-map-adapter.yml @@ -1,8 +1,6 @@ name: Publish War3App.MapAdapter on: - pull_request: - branches: ['master'] workflow_dispatch: env: