Skip to content

Commit d8cf82a

Browse files
committed
build 472,8,9,10
1 parent d7c213e commit d8cf82a

File tree

3 files changed

+96
-17
lines changed

3 files changed

+96
-17
lines changed

.github/workflows/release-nuget.yml

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,26 @@ jobs:
4646
echo "github.ref_name=${{ github.ref_name }}"
4747
echo "Version check of git tag and CHANGELOG.md passed successfully."
4848
49+
50+
51+
# publish net 10 with no suffix
52+
- name: Set target framework to net10 in FeshHosting.fsproj
53+
run: |
54+
$projFile = Get-Content -Path FeshHosting.fsproj -Raw
55+
$projFile = $projFile -replace "<TargetFramework>.*?</TargetFramework>", "<TargetFramework>net10.0-windows</TargetFramework>"
56+
Set-Content -Path FeshHosting.fsproj -Value $projFile
57+
4958
- name: Push net10 NuGet package to nuget.org
5059
run: |
5160
dotnet nuget push `
5261
./bin/publishNuget/Fesh.${{ github.ref_name }}.symbols.nupkg `
5362
--api-key ${{ secrets.NUGET_API_KEY }} `
5463
--source https://api.nuget.org/v3/index.json
5564
56-
# now that net8 is done do the same for net472
57-
# all of this is only needed because <TargetFrameworks>net8.0-windows;net472</TargetFrameworks> does no make a valid nuget package for net48
58-
# so we make a separate build for net8.0 and net472
65+
# now packages with suffix:
66+
67+
# all of this is only needed because <TargetFrameworks>net8.0-windows;net472</TargetFrameworks> does no make a valid nuget package for net48
68+
# so we make a separate build for net8 and net472 and net9
5969

6070
- name: Set target framework to net472 in FeshHosting.fsproj
6171
run: |
@@ -70,11 +80,65 @@ jobs:
7080
Set-Content -Path CHANGELOG.md -Value $content
7181
7282
- name: Dotnet build FeshHosting for net472
73-
run: dotnet build FeshHosting.fsproj --configuration Release --output bin/publishNuget
83+
run: |
84+
Remove-Item -Path ./bin/publishNuget/* -Recurse -Force
85+
dotnet build FeshHosting.fsproj --configuration Release --output bin/publishNuget
7486
7587
- name: Push net472 NuGet package to nuget.org
7688
run: |
7789
dotnet nuget push `
7890
./bin/publishNuget/Fesh.${{ github.ref_name }}-net472.symbols.nupkg `
7991
--api-key ${{ secrets.NUGET_API_KEY }} `
92+
--source https://api.nuget.org/v3/index.json
93+
94+
95+
# now that net472 is done do the same for net8
96+
- name: Set target framework to net8 in FeshHosting.fsproj
97+
run: |
98+
$projFile = Get-Content -Path FeshHosting.fsproj -Raw
99+
$projFile = $projFile -replace "<TargetFramework>.*?</TargetFramework>", "<TargetFramework>net8.0-windows</TargetFramework>"
100+
Set-Content -Path FeshHosting.fsproj -Value $projFile
101+
102+
- name : Set -net8 suffix in changelog
103+
run: |
104+
$content = Get-Content -Path CHANGELOG.md -Raw
105+
$content = $content -replace "${{ github.ref_name }}-net472", "${{ github.ref_name }}-net8"
106+
Set-Content -Path CHANGELOG.md -Value $content
107+
108+
- name: Dotnet build FeshHosting for net8
109+
run: |
110+
Remove-Item -Path ./bin/publishNuget/* -Recurse -Force
111+
dotnet build FeshHosting.fsproj --configuration Release --output bin/publishNuget
112+
113+
- name: Push net8 NuGet package to nuget.org
114+
run: |
115+
dotnet nuget push `
116+
./bin/publishNuget/Fesh.${{ github.ref_name }}-net8.symbols.nupkg `
117+
--api-key ${{ secrets.NUGET_API_KEY }} `
118+
--source https://api.nuget.org/v3/index.json
119+
120+
121+
# now that net472 is done do the same for net9
122+
- name: Set target framework to net9 in FeshHosting.fsproj
123+
run: |
124+
$projFile = Get-Content -Path FeshHosting.fsproj -Raw
125+
$projFile = $projFile -replace "<TargetFramework>.*?</TargetFramework>", "<TargetFramework>net9.0-windows</TargetFramework>"
126+
Set-Content -Path FeshHosting.fsproj -Value $projFile
127+
128+
- name : Set -net9 suffix in changelog
129+
run: |
130+
$content = Get-Content -Path CHANGELOG.md -Raw
131+
$content = $content -replace "${{ github.ref_name }}-net8", "${{ github.ref_name }}-net9"
132+
Set-Content -Path CHANGELOG.md -Value $content
133+
134+
- name: Dotnet build FeshHosting for net9
135+
run: |
136+
Remove-Item -Path ./bin/publishNuget/* -Recurse -Force
137+
dotnet build FeshHosting.fsproj --configuration Release --output bin/publishNuget
138+
139+
- name: Push net9 NuGet package to nuget.org
140+
run: |
141+
dotnet nuget push `
142+
./bin/publishNuget/Fesh.${{ github.ref_name }}-net9.symbols.nupkg `
143+
--api-key ${{ secrets.NUGET_API_KEY }} `
80144
--source https://api.nuget.org/v3/index.json

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [0.30.0-alpha1] - 2025-12-19
10+
## [0.30.0-alpha3] - 2025-12-19
1111
### Changed
12-
- net472 nuget with suffix, net10 nuget without suffix
12+
- net472, net8, net9 nuget with suffix, net10 nuget without suffix
13+
- don't load nuget packages while typing them to avoid loading unwanted packages
1314

1415
## [0.29.3] - 2025-12-15
1516
### Changed

FeshHosting.fsproj

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<UseWindowsForms>true</UseWindowsForms><!--inherited from Avalonedit ?-->
1010
<!-- <TargetFrameworks>net472;net8.0-windows</TargetFrameworks> somehow the resultant nuget from multiple target frameworks
1111
does get unified to 8.0 and does not work on net48 -->
12-
<!--so the the release-nuget.yml aktion will change this and also publish a net472 nuget separately: -->
13-
<TargetFramework>net8.0-windows</TargetFramework>
12+
<!--so the the release-nuget.yml aktion will change this and also publish a net472,net8,net9 nuget separately: -->
13+
<TargetFramework>net8.0-windows</TargetFramework> <!-- use the lowest F# here by default -->
1414

1515
<DefineConstants Condition="'$(TargetFramework)' == 'net472'">NETFRAMEWORK</DefineConstants> <!-- so thread.Abort() can be used -->
16+
<DefineConstants Condition="'$(TargetFramework)' == 'net8.0-windows'">NET8</DefineConstants> <!-- so that caret in GetProjectOptionsFromScript can be skipped-->
1617

1718
<LangVersion>preview</LangVersion><!-- to enable indexing from end via ^ -->
1819

@@ -56,6 +57,28 @@
5657
<PackageTags>WPF TextEditor fsharp scripting FSI AvalonEdit fesh</PackageTags>
5758
</PropertyGroup>
5859

60+
61+
<!-- build the NET core nuget for F#8 so that dependencies like System.Diagnostics.DiagnosticSource are also for net8 and load properly in Rhino and Revit:
62+
see https://github.com/dotnet/fsharp/issues/19174
63+
Use Include not Update for FSharp.Core because of DisableImplicitFSharpCoreReference-->
64+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'"> <!-- net472 can use the latest versions -->
65+
<PackageReference Include="FSharp.Compiler.Service" Version="43.10.101" />
66+
<PackageReference Include="FSharp.Core" Version="10.0.101" />
67+
</ItemGroup>
68+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-windows'">
69+
<PackageReference Include="FSharp.Compiler.Service" Version="43.10.101" />
70+
<PackageReference Include="FSharp.Core" Version="10.0.101" />
71+
</ItemGroup>
72+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
73+
<PackageReference Include="FSharp.Compiler.Service" Version="43.8.403" />
74+
<PackageReference Include="FSharp.Core" Version="8.0.403" />
75+
</ItemGroup>
76+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-windows'">
77+
<PackageReference Include="FSharp.Compiler.Service" Version="43.9.303" />
78+
<PackageReference Include="FSharp.Core" Version="9.0.303" />
79+
</ItemGroup>
80+
81+
5982
<ItemGroup>
6083
<PackageReference Include="Velopack" Version="0.0.1298" />
6184
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
@@ -64,15 +87,6 @@
6487
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" /> <!-- to move files to the recycle bin instead of deleting them -->
6588
<PackageReference Include="System.Private.Uri" Version="4.3.2" /> <!-- warning NU1903: Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-5f2m-466j-3848 -->
6689

67-
<PackageReference Include="FSharp.Compiler.Service" Version="43.10.101" />
68-
<PackageReference Include="FSharp.Core" Version="10.0.101" />
69-
70-
<!-- build the NET core nuget for F#8 so that dependencies like System.Diagnostics.DiagnosticSource are also for Net80 and load properly in Rhino and Revit:-->
71-
<!-- <PackageReference Include="FSharp.Compiler.Service" Version="43.10.101" Condition="'$(TargetFramework)' == 'net472'" />
72-
<PackageReference Include="FSharp.Compiler.Service" Version="43.8.403" Condition="'$(TargetFramework)' != 'net472'" />
73-
<PackageReference Include="FSharp.Core" Version="10.0.101" Condition="'$(TargetFramework)' == 'net472'"/>
74-
<PackageReference Include="FSharp.Core" Version="8.0.403" Condition="'$(TargetFramework)' != 'net472'"/> -->
75-
7690
<PackageReference Include="Fittings" Version="0.10.0" />
7791
<PackageReference Include="AvalonLog" Version="0.20.0" />
7892
</ItemGroup>

0 commit comments

Comments
 (0)