|
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: | |
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 |
| - EXECUTABLE_NAME: "Cortex Command.exe" |
43 |
| - |
44 | 37 | NAME_MAPPING: |
|
45 | 38 | {"Final": "Cortex Command.exe",
|
46 | 39 | "Debug Release": "Cortex Command.debug.release.exe",
|
|
55 | 48 | steps:
|
56 | 49 | - uses: actions/checkout@v3
|
57 | 50 |
|
58 |
| - - name: Set color |
59 |
| - id: random-color-generator |
60 |
| - run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT |
61 |
| - shell: bash |
62 |
| - |
63 |
| - - name: Get color |
64 |
| - run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}" |
65 |
| - shell: bash |
66 |
| - |
67 |
| - - name: Determine executable name |
68 |
| - id: executable_name |
69 |
| - if: ${{inputs.upload_artefacts}} |
70 |
| - run: | |
71 |
| - echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_ENV" |
72 |
| - shell: bash |
73 |
| - |
74 |
| - - run: | |
75 |
| - echo "${{ env.EXECUTABLE_NAME }}" |
76 |
| - shell: bash |
77 |
| -
|
78 | 51 | - name: Add MSBuild to PATH
|
79 | 52 | uses: microsoft/setup-msbuild@v1
|
80 | 53 |
|
|
84 | 57 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
85 | 58 | run: msbuild /m /p:Configuration="${{inputs.build_configuration}}" ${{env.SOLUTION_FILE_PATH}}
|
86 | 59 |
|
| 60 | + - name: Determine executable name |
| 61 | + id: executable_name |
| 62 | + if: ${{inputs.upload_artefacts}} |
| 63 | + run: | |
| 64 | + echo "EXECUTABLE_NAME=${{ fromJson(env.NAME_MAPPING)[inputs.build_configuration] }}" >> "$GITHUB_OUTPUT" |
| 65 | + shell: bash |
| 66 | + |
87 | 67 | - name: Upload Artifact
|
88 | 68 | if: ${{inputs.upload_artefacts}}
|
89 | 69 | uses: actions/upload-artifact@v3
|
|
0 commit comments