|
34 | 34 | env:
|
35 | 35 | # Path to the solution file relative to the root of the project.
|
36 | 36 | SOLUTION_FILE_PATH: RTEA.sln
|
37 |
| - NAME_MAPPING: "{\"Final\": \"Cortex Command.exe\", \"Debug Release\": \"Cortex Command.debug.release.exe\", \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", \"Debug Full\": \"Cortex Command.debug.full.exe\"}" |
38 |
| - |
| 37 | + # NAME_MAPPING: | |
| 38 | + # "{"Final\": \"Cortex Command.exe\", |
| 39 | + # \"Debug Release\": \"Cortex Command.debug.release.exe\", |
| 40 | + # \"Debug Minimal\": \"Cortex Command.debug.minimal.exe\", |
| 41 | + # \"Debug Full\": \"Cortex Command.debug.full.exe\"}" |
| 42 | + |
| 43 | + NAME_MAPPING: | |
| 44 | + {"Final": "Cortex Command.exe", |
| 45 | + "Debug Release": "Cortex Command.debug.release.exe", |
| 46 | + "Debug Minimal": "Cortex Command.debug.minimal.exe", |
| 47 | + "Debug Full": "Cortex Command.debug.full.exe"} |
39 | 48 |
|
40 | 49 | jobs:
|
41 | 50 | build:
|
|
45 | 54 | steps:
|
46 | 55 | - uses: actions/checkout@v3
|
47 | 56 |
|
| 57 | + - name: Determine executable name |
| 58 | + id: executable_name |
| 59 | + if: ${{inputs.upload_artefacts}} |
| 60 | + run: | |
| 61 | + echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" |
| 62 | + |
| 63 | + - run: | |
| 64 | + echo ${{ steps.executable_name.outputs.EXECUTABLE_NAME }} |
| 65 | +
|
48 | 66 | - name: Add MSBuild to PATH
|
49 | 67 | uses: microsoft/setup-msbuild@v1
|
50 | 68 |
|
|
54 | 72 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
55 | 73 | run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}}
|
56 | 74 |
|
57 |
| - - name: Determine executable name |
58 |
| - id: executable_name |
59 |
| - if: ${{inputs.upload_artefacts}} |
60 |
| - run: | |
61 |
| - echo 'EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}' >> "$GITHUB_OUTPUT" |
62 |
| -
|
63 | 75 | - name: Upload Artifact
|
64 | 76 | if: ${{inputs.upload_artefacts}}
|
65 | 77 | uses: actions/upload-artifact@v3
|
|
0 commit comments