summaryrefslogtreecommitdiff
path: root/.github/workflows/msbuild.yml
blob: 4518c0f85afe1db8785b95091147056c8e537b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build driver
on:
  push:
    branches:
      - trunk
jobs:
  build:
    strategy:
      matrix:
        configuration: [Debug, Release]
        platform: [x64]
    runs-on: windows-2022
    env:
      Driver_Solution_Path: MIIEow\MIIEow\MIIEow.sln
      Client_Solution_Path: MIIEowClient\MIIEowClient\MIIEowClient.sln
    steps:
      - name: Check out repository code
        uses: actions/checkout@v3

      - name: Add MSBuild to PATH
        uses: microsoft/[email protected]

      - name: Build solutions
        run: |
          msbuild ${{ env.Driver_Solution_Path }} -p:Configuration=${{ env.Configuration }} -p:Platform=${{ env.Platform }}
          msbuild ${{ env.Client_Solution_Path }} -p:Configuration=${{ env.Configuration }} -p:Platform=${{ env.Platform }}
        env:
          Configuration: ${{ matrix.configuration }}
          Platform: ${{ matrix.platform }}

      - name: Package
        run: |
          mkdir ${{ env.Configuration }}_${{ env.Platform }}/
          xcopy /e /k /h /i MIIEow\MIIEow\${{ env.Platform }}\${{ env.Configuration }} ${{ env.Configuration }}_${{ env.Platform }}/
          xcopy /e /k /h /i MIIEowClient\MIIEowClient\${{ env.Platform }}\${{ env.Configuration }} ${{ env.Configuration }}_${{ env.Platform }}/
        env:
          Configuration: ${{ matrix.configuration }}
          Platform: ${{ matrix.platform }}

      - name: Upload
        uses: actions/upload-artifact@v4
        with:
          name: miieow_${{ github.sha }}_${{ env.Configuration }}_${{ env.Platform }}
          path: ${{ env.Configuration }}_${{ env.Platform }}
        env:
          Configuration: ${{ matrix.configuration }}
          Platform: ${{ matrix.platform }}