diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 9c2417867..67edef0c3 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -21,8 +21,33 @@ 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 + echo @" + #include "Types.h" + #include "GameVersion.h" - - name: Replace GameVersion.cpp + 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.exe ja2/mapeditor_113_${{ env.SHA_SHORT }}.exe + + - name: Replace GameVersion.cpp (JA2) run: | rm GameVersion.cpp echo @" @@ -35,16 +60,51 @@ 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 JA2 output + 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: | + 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: Rename output - run: mv bin/VS2013/JA2_EN_Release_master_VS2019.exe ja2_113_${{ env.SHA_SHORT }}.exe - + - 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/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/ + !ja2/.git/ - diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml new file mode 100644 index 000000000..9b9d9149f --- /dev/null +++ b/.github/workflows/test-action.yml @@ -0,0 +1,27 @@ +name: test-action + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - 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 +