From daac4f98f8335b9599947e8a96e942f0b9f29c47 Mon Sep 17 00:00:00 2001 From: Bertrand Martin <32521698+bertysentry@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:51:04 +0200 Subject: [PATCH 1/3] Create msbuild.yml --- .github/workflows/msbuild.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/msbuild.yml diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 0000000..74610ca --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,39 @@ +name: Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: . + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + BUILD_CONFIGURATION: Release + + # Platform x86|x64 + TARGET_PLATFORM: x86 + +permissions: + contents: read + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /t:Rebuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.TARGET_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} From b2dbb1377770fcfa954325bb19d8eacc4d01a744 Mon Sep 17 00:00:00 2001 From: Bertrand Martin <32521698+bertysentry@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:53:46 +0200 Subject: [PATCH 2/3] Add upload artifact step --- .github/workflows/msbuild.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 74610ca..fef351e 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -37,3 +37,9 @@ jobs: # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /t:Rebuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.TARGET_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} + + - name: Upload Executable Artifact + uses: actions/upload-artifact@v4 + with: + name: SEN_EventLogReader_exe + path: ./Release/SEN_EventLogReader.exe From 9d8de5edf422a7c3da10cc4d9d83213595dc1f70 Mon Sep 17 00:00:00 2001 From: Bertrand Martin <32521698+bertysentry@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:56:47 +0200 Subject: [PATCH 3/3] Removed x86 platform option --- .github/workflows/msbuild.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index fef351e..f57f590 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -15,9 +15,6 @@ env: # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix BUILD_CONFIGURATION: Release - # Platform x86|x64 - TARGET_PLATFORM: x86 - permissions: contents: read @@ -36,7 +33,7 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /t:Rebuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.TARGET_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} + run: msbuild /t:Rebuild /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - name: Upload Executable Artifact uses: actions/upload-artifact@v4