From 71903e5fa5f8b5108e3d882446382bbf0e6c9231 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 10:01:07 -0800 Subject: [PATCH 01/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 46 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 9c2417867..5bb31f596 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -22,7 +22,7 @@ jobs: echo "${{ env.SHA_SHORT }}" echo "${{ env.DATE }}" - - name: Replace GameVersion.cpp + - name: Replace GameVersion.cpp (JA2) run: | rm GameVersion.cpp echo @" @@ -35,16 +35,52 @@ jobs: CHAR16 zRevisionNumber[16] = { L"Hash ${{ env.SHA_SHORT }}" }; "@ | Out-File -FilePath GameVersion.cpp - - name: Build + - name: Build JA2 run: msbuild ja2_VS2019.sln -property:Configuration=Release - - - name: Rename output + + - name: Rename JA2 output run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_113_${{ env.SHA_SHORT }}.exe + + - name: Replace GameVersion.cpp and builddefines.h (JA2 UB) + run: | + rm GameVersion.cpp + echo @" + #include "Types.h" + #include "GameVersion.h" + + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business v1.13 (Development Build) (Github)" }; + CHAR8 czVersionNumber[16] = { "V ${{ env.DATE }}" }; + CHAR16 zTrackingNumber[16] = { L"Z" }; + CHAR16 zRevisionNumber[16] = { L"Hash ${{ env.SHA_SHORT }}" }; + "@ | Out-File -FilePath GameVersion.cpp + + rm builddefines.h + echo @" + #ifndef _BUILDDEFINES_H_ + #define _BUILDDEFINES_H_ + #include "Language Defines.h" + #define JA2UB + #define JA2UBMAPS + #define FORCE_ASSERTS_ON + #define _CRT_SECURE_NO_WARNINGS + #define _CRT_NON_CONFORMING_SWPRINTFS + #define _SCL_SECURE_NO_WARNINGS + #include "Profiler.h" + #endif + "@ | Out-File -FilePath builddefines.h + + - name: Build JA2 UB + run: msbuild ja2_VS2019.sln -property:Configuration=Release + + - name: Rename JA2 UB output + run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_ub_113_${{ env.SHA_SHORT }}.exe - name: Upload executable uses: actions/upload-artifact@v3 with: name: ja2_113 - path: ja2_113_${{ env.SHA_SHORT }}.exe + path: | + ja2_113_${{ env.SHA_SHORT }}.exe + ja2_ub_113_${{ env.SHA_SHORT }}.exe From 17153cbcf3ea9280fccd94b56afa512a36aec3ed Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 11:31:42 -0800 Subject: [PATCH 02/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 5bb31f596..25e33b597 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -75,6 +75,25 @@ jobs: - name: Rename JA2 UB output run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_ub_113_${{ env.SHA_SHORT }}.exe + - name: Replace GameVersion.cpp (Map Editor) + run: | + rm GameVersion.cpp + echo @" + #include "Types.h" + #include "GameVersion.h" + + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13 (Development Build) (Github)" }; + CHAR8 czVersionNumber[16] = { "V ${{ env.DATE }}" }; + CHAR16 zTrackingNumber[16] = { L"Z" }; + CHAR16 zRevisionNumber[16] = { L"Hash ${{ env.SHA_SHORT }}" }; + "@ | Out-File -FilePath GameVersion.cpp + + - name: Build Map Editor + run: msbuild ja2_VS2019.sln -property:Configuration=MapEditor + + - name: Rename Map Editor output + run: mv bin/VS2013/MapEditor_EN_Release_master_VS2019.exe mapeditor_113_${{ env.SHA_SHORT }}.exe + - name: Upload executable uses: actions/upload-artifact@v3 with: @@ -82,5 +101,6 @@ jobs: path: | ja2_113_${{ env.SHA_SHORT }}.exe ja2_ub_113_${{ env.SHA_SHORT }}.exe + mapeditor_113_${{ env.SHA_SHORT }}.exe From d827d5fe1a945e7b3f32f1bafd979deca186fcfa Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 11:52:29 -0800 Subject: [PATCH 03/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 25e33b597..b132ae859 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -22,6 +22,25 @@ jobs: echo "${{ env.SHA_SHORT }}" echo "${{ env.DATE }}" + - name: Replace GameVersion.cpp (Map Editor) + run: | + rm GameVersion.cpp + echo @" + #include "Types.h" + #include "GameVersion.h" + + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13 (Development Build) (Github)" }; + CHAR8 czVersionNumber[16] = { "V ${{ env.DATE }}" }; + CHAR16 zTrackingNumber[16] = { L"Z" }; + CHAR16 zRevisionNumber[16] = { L"Hash ${{ env.SHA_SHORT }}" }; + "@ | Out-File -FilePath GameVersion.cpp + + - name: Build Map Editor + run: msbuild ja2_VS2019.sln -property:Configuration=MapEditor + + - name: Rename Map Editor output + run: mv bin/VS2013/MapEditor_EN_Release_master_VS2019.exe mapeditor_113_${{ env.SHA_SHORT }}.exe + - name: Replace GameVersion.cpp (JA2) run: | rm GameVersion.cpp @@ -74,26 +93,7 @@ jobs: - name: Rename JA2 UB output run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_ub_113_${{ env.SHA_SHORT }}.exe - - - name: Replace GameVersion.cpp (Map Editor) - run: | - rm GameVersion.cpp - echo @" - #include "Types.h" - #include "GameVersion.h" - - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13 (Development Build) (Github)" }; - CHAR8 czVersionNumber[16] = { "V ${{ env.DATE }}" }; - CHAR16 zTrackingNumber[16] = { L"Z" }; - CHAR16 zRevisionNumber[16] = { L"Hash ${{ env.SHA_SHORT }}" }; - "@ | Out-File -FilePath GameVersion.cpp - - - name: Build Map Editor - run: msbuild ja2_VS2019.sln -property:Configuration=MapEditor - - name: Rename Map Editor output - run: mv bin/VS2013/MapEditor_EN_Release_master_VS2019.exe mapeditor_113_${{ env.SHA_SHORT }}.exe - - name: Upload executable uses: actions/upload-artifact@v3 with: From 028db92f2a343083bbaf2a5ab596a32600f8028d Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:08:08 -0800 Subject: [PATCH 04/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index b132ae859..5c2373884 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -39,7 +39,7 @@ jobs: run: msbuild ja2_VS2019.sln -property:Configuration=MapEditor - name: Rename Map Editor output - run: mv bin/VS2013/MapEditor_EN_Release_master_VS2019.exe mapeditor_113_${{ env.SHA_SHORT }}.exe + run: mv bin/VS2013/MapEditor_EN_Release_master.exe mapeditor_113_${{ env.SHA_SHORT }}.exe - name: Replace GameVersion.cpp (JA2) run: | From 5306364f77b4c514ede28bf36536b9c5987b0555 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 18:28:33 -0800 Subject: [PATCH 05/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 5c2373884..de029aa21 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -21,7 +21,13 @@ jobs: run: | echo "${{ env.SHA_SHORT }}" echo "${{ env.DATE }}" - + + - name: Checkout gamedir + uses: actions/checkout@v3 + with: + repository: 1dot13/gamedir + path: ja2 + - name: Replace GameVersion.cpp (Map Editor) run: | rm GameVersion.cpp @@ -39,7 +45,7 @@ jobs: run: msbuild ja2_VS2019.sln -property:Configuration=MapEditor - name: Rename Map Editor output - run: mv bin/VS2013/MapEditor_EN_Release_master.exe mapeditor_113_${{ env.SHA_SHORT }}.exe + run: mv bin/VS2013/MapEditor_EN_Release_master.exe ja2/mapeditor_113_${{ env.SHA_SHORT }}.exe - name: Replace GameVersion.cpp (JA2) run: | @@ -58,7 +64,7 @@ jobs: run: msbuild ja2_VS2019.sln -property:Configuration=Release - name: Rename JA2 output - run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_113_${{ env.SHA_SHORT }}.exe + run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2/ja2_113_${{ env.SHA_SHORT }}.exe - name: Replace GameVersion.cpp and builddefines.h (JA2 UB) run: | @@ -92,15 +98,12 @@ jobs: run: msbuild ja2_VS2019.sln -property:Configuration=Release - name: Rename JA2 UB output - run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_ub_113_${{ env.SHA_SHORT }}.exe + run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2/ja2_ub_113_${{ env.SHA_SHORT }}.exe - name: Upload executable uses: actions/upload-artifact@v3 with: name: ja2_113 - path: | - ja2_113_${{ env.SHA_SHORT }}.exe - ja2_ub_113_${{ env.SHA_SHORT }}.exe - mapeditor_113_${{ env.SHA_SHORT }}.exe + path: ja2/* From 13e7d9492487de7d93ab7850cf83a4c00dbe98ae Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 19:57:38 -0800 Subject: [PATCH 06/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index de029aa21..1785db05a 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -104,6 +104,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: ja2_113 - path: ja2/* + path: ja2/ From db757fd79da504e58e7b7c50237e6c612afd2c03 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 20:45:13 -0800 Subject: [PATCH 07/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 1785db05a..2ab69fad0 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -27,6 +27,9 @@ jobs: with: repository: 1dot13/gamedir path: ja2 + + - name: Clean gamedir + run: Remove-Item "ja2/.git" -Recurse - name: Replace GameVersion.cpp (Map Editor) run: | From 436936c0882648914d45346b6c6a6f7f7ef20a45 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 20:48:50 -0800 Subject: [PATCH 08/11] Update manual-build.yml --- .github/workflows/manual-build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 2ab69fad0..077858307 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -27,9 +27,6 @@ jobs: with: repository: 1dot13/gamedir path: ja2 - - - name: Clean gamedir - run: Remove-Item "ja2/.git" -Recurse - name: Replace GameVersion.cpp (Map Editor) run: | @@ -107,6 +104,8 @@ jobs: uses: actions/upload-artifact@v3 with: name: ja2_113 - path: ja2/ + path: | + ja2/ + !ja2/.git/ From f4311a5a351ecab7068e39e4f949603e58549bb9 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:30:55 -0800 Subject: [PATCH 09/11] Create test-action.yml --- .github/workflows/test-action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/test-action.yml diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml new file mode 100644 index 000000000..a71fb1f4d --- /dev/null +++ b/.github/workflows/test-action.yml @@ -0,0 +1,11 @@ +name: manual build + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 \ No newline at end of file From d3a4ff8b3941119c9dcd2f3187336220eaf768e3 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:39:25 -0800 Subject: [PATCH 10/11] Update test-action.yml --- .github/workflows/test-action.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index a71fb1f4d..f8afce74d 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -1,4 +1,4 @@ -name: manual build +name: compression test on: workflow_dispatch: @@ -8,4 +8,20 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 \ No newline at end of file + - name: checkout + uses: actions/checkout@v3 + + - name: compress + uses: TheDoctor0/zip-release@0.6.2 + with: + filename: test.zip + #path: # optional, default is . + # Working directory before zipping + #directory: # optional, default is . + # List of excluded files / directories + #exclusions: # optional, default is + # List of excluded files / directories with recursive wildcards (only applies on Windows with `zip` type) + #recursive_exclusions: # optional, default is + # Tool to use for archiving + #type: # optional, default is zip + From e4432d40b62a8338364f4402dc405754872d2735 Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:40:03 -0800 Subject: [PATCH 11/11] Update test-action.yml --- .github/workflows/test-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index f8afce74d..9b9d9149f 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -1,4 +1,4 @@ -name: compression test +name: test-action on: workflow_dispatch: