Skip to content

Commit a63616c

Browse files
authored
DYN-8977 Create global.json dynamically (#16266)
1 parent 34b9cb3 commit a63616c

5 files changed

Lines changed: 64 additions & 20 deletions

File tree

.github/workflows/build_dynamo_all.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ jobs:
1616
with:
1717
path: Dynamo
1818
repository: DynamoDS/Dynamo
19+
- name: Create global.json
20+
run: |
21+
$globalJson = @"
22+
{
23+
"projects": ["src", "test"],
24+
"sdk": {
25+
"version": "8.0.100",
26+
"rollForward": "latestFeature"
27+
}
28+
}
29+
"@
30+
$globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8
1931
- name: Setup dotnet
2032
uses: actions/setup-dotnet@v4
2133
with:

.github/workflows/build_dynamo_core.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ jobs:
1616
with:
1717
path: Dynamo
1818
repository: DynamoDS/Dynamo
19+
- name: Create global.json
20+
run: |
21+
$globalJson = @"
22+
{
23+
"projects": ["src", "test"],
24+
"sdk": {
25+
"version": "8.0.100",
26+
"rollForward": "latestFeature"
27+
}
28+
}
29+
"@
30+
$globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8
1931
- name: Setup dotnet
2032
uses: actions/setup-dotnet@v4
2133
with:
@@ -47,6 +59,18 @@ jobs:
4759
with:
4860
path: Dynamo
4961
repository: DynamoDS/Dynamo
62+
- name: Create global.json
63+
run: |
64+
$globalJson = @"
65+
{
66+
"projects": ["src", "test"],
67+
"sdk": {
68+
"version": "8.0.100",
69+
"rollForward": "latestFeature"
70+
}
71+
}
72+
"@
73+
$globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8
5074
- name: Setup dotnet
5175
uses: actions/setup-dotnet@v4
5276
with:

.github/workflows/dynamo_bin_diff.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ jobs:
1717
with:
1818
path: Dynamo
1919
repository: DynamoDS/Dynamo
20+
- name: Create global.json
21+
run: |
22+
$globalJson = @"
23+
{
24+
"projects": ["src", "test"],
25+
"sdk": {
26+
"version": "8.0.100",
27+
"rollForward": "latestFeature"
28+
}
29+
}
30+
"@
31+
$globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8
2032
- name: Setup dotnet
2133
uses: actions/setup-dotnet@v4
2234
with:
@@ -26,12 +38,9 @@ jobs:
2638
- name: Setup msbuild
2739
uses: microsoft/setup-msbuild@v2
2840
- name: Install dependencies for windows runtime
29-
run: |
30-
dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
41+
run: dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
3142
- name: Build Dynamo with MSBuild
32-
run: |
33-
Write-Output "***Continue with the build, Good luck developer!***"
34-
msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release
43+
run: msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release
3544
- name: Look for DynamoCLI.exe
3645
run: |
3746
Write-Output "***Locating DynamoCLI.exe!***"
@@ -57,6 +66,18 @@ jobs:
5766
path: master
5867
ref: master
5968
repository: DynamoDS/Dynamo
69+
- name: Create global.json
70+
run: |
71+
$globalJson = @"
72+
{
73+
"projects": ["src", "test"],
74+
"sdk": {
75+
"version": "8.0.100",
76+
"rollForward": "latestFeature"
77+
}
78+
}
79+
"@
80+
$globalJson | Out-File -FilePath ${{ github.workspace }}\master\global.json -Encoding utf8
6081
- name: Setup dotnet
6182
uses: actions/setup-dotnet@v4
6283
with:
@@ -66,12 +87,9 @@ jobs:
6687
- name: Setup msbuild
6788
uses: microsoft/setup-msbuild@v2
6889
- name: Install dependencies for windows runtime
69-
run: |
70-
dotnet restore ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 -p:DotNet=net8.0
90+
run: dotnet restore ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
7191
- name: Build Dynamo with MSBuild
72-
run: |
73-
Write-Output "***Continue with the build, Good luck developer!***"
74-
msbuild ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release /p:DotNet=net8.0
92+
run: msbuild ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release
7593
- name: Look for DynamoCLI.exe
7694
run: |
7795
Write-Output "***Locating DynamoCLI.exe!***"

src/global.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/global.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)