Skip to content

Commit fc18b70

Browse files
committed
move msbuild dependency support to install-dependencies
1 parent 6b8d7a1 commit fc18b70

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.github/actions/compile/action.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ inputs:
1111
type: string
1212
dependency-identifiers:
1313
type: string
14-
dependency-msbuild-target:
14+
msbuild-dependency-target:
1515
type: string
16-
default: CKANInstall
1716
solution-file-path:
1817
type: string
1918

@@ -37,16 +36,12 @@ runs:
3736
dotnet-version: 5.x
3837

3938
- name: Install Dependencies
40-
if: inputs.dependency-identifiers != ''
39+
if: inputs.dependency-identifiers != '' || inputs.msbuild-dependency-target != ''
4140
uses: KSPModdingLibs/KSPBuildTools/.github/actions/install-dependencies@main
4241
with:
4342
dependency-identifiers: ${{ inputs.dependency-identifiers }}
44-
45-
- name: Install Dependencies With MSBuild
46-
if: inputs.dependency-msbuild-target != ''
47-
shell: bash
48-
working-directory: ${{ github.workspace }}
49-
run: msbuild /t:${{ inputs.dependency-msbuild-target }} /p:KSPRoot=${{ env.KSP_ROOT }} ${{ inputs.solution-file-path }}
43+
msbuild-dependency-target: ${{ inputs.msbuild-dependency-target }}
44+
solution-file-path: ${{ inputs.solution-file-path }}
5045

5146
- name: Download KSP Libs
5247
shell: bash

.github/actions/install-dependencies/action.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: install-dependencies
33
inputs:
44
dependency-identifiers:
55
type: string
6-
required: true
6+
msbuild-dependency-target:
7+
type: string
8+
solution-file-path:
9+
type: string
710
ckan-compatible-versions:
811
type: string
912
default: |
@@ -51,11 +54,24 @@ runs:
5154
done
5255
5356
- name: ckan-install-mod
57+
if: inputs.dependency-identifiers != ''
5458
shell: bash
5559
run: |
5660
identifiers="${{ inputs.dependency-identifiers}}"
5761
ckan install --no-recommends --headless $identifiers
5862
63+
- name: Setup .NET
64+
if: inputs.msbuild-dependency-target != ''
65+
uses: actions/setup-dotnet@v4
66+
with:
67+
dotnet-version: 5.x
68+
69+
- name: msbuild-dependency-target
70+
if: inputs.msbuild-dependency-target != ''
71+
shell: bash
72+
working-directory: ${{ github.workspace }}
73+
run: msbuild /t:${{ inputs.msbuild-dependency-target }} /p:KSPRoot=${{ env.KSP_ROOT }} ${{ inputs.solution-file-path }}
74+
5975
- name: debug
6076
if: env.ACTIONS_STEP_DEBUG
6177
shell: bash

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
default: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip
1515
dependency-identifiers:
1616
type: string
17+
msbuild-dependency-target:
18+
type: string
1719
solution-file-path:
1820
type: string
1921
secrets:
@@ -44,6 +46,7 @@ jobs:
4446
ksp-zip-url: ${{ inputs.ksp-zip-url }}
4547
ksp-zip-password: ${{ secrets.ksp-zip-password }}
4648
dependency-identifiers: ${{ inputs.dependency-identifiers }}
49+
msbuild-dependency-target: ${{ inputs.msbuild-dependency-target }}
4750
solution-file-path: ${{ inputs.solution-file-path }}
4851

4952
- name: assemble-release

0 commit comments

Comments
 (0)