Skip to content

Commit 8785d7c

Browse files
committed
Migrated the library to Uno 5.1 and .NET 8
1 parent 4c7fcf7 commit 8785d7c

25 files changed

+410
-501
lines changed

.github/workflows/publish_ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Publish to MyGet
2+
3+
on:
4+
push:
5+
branches:
6+
- uno
7+
8+
env:
9+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
10+
DOTNET_NOLOGO: true
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-2022
16+
17+
steps:
18+
19+
- name: Check-out
20+
uses: actions/checkout@v4
21+
22+
- name: Set Build Version
23+
run: |
24+
cd src/Elmish.Uno
25+
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length)
26+
$File = (
27+
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path Elmish.Uno.fsproj
28+
)[0].Node
29+
$File.InnerText = $version
30+
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Elmish.Uno.fsproj))
31+
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
32+
shell: pwsh
33+
34+
- name: Setup .NET Core
35+
uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: 8.0.x
38+
39+
- name: Add the GitHub and MyGet sources
40+
run: |
41+
dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name "github.com" "https://nuget.pkg.github.com/fsprojects/index.json"
42+
dotnet nuget add source --username USERNAME --password ${{secrets.MYGET_TOKEN}} --store-password-in-clear-text --name "myget.org" "https://www.myget.org/F/elmish_uno/api/v3/index.json"
43+
44+
- name: Install local tools
45+
run: dotnet tool restore
46+
47+
- name: Restore NuGet packages
48+
run: dotnet restore Elmish.Uno.sln
49+
50+
- name: Build
51+
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount
52+
53+
- name: Test
54+
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj
55+
56+
- name: Pack
57+
run: |
58+
cd src/Elmish.Uno
59+
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget
60+
61+
- name: Publish to MyGet
62+
run: |
63+
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
64+
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "myget.org" -k ${{secrets.MYGET_SECRET}} --skip-duplicate
65+

.github/workflows/publish_myget.yml

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

.github/workflows/publish_nuget.yml

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

.github/workflows/publish_release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- 'releases/*'
7+
8+
env:
9+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
10+
DOTNET_NOLOGO: true
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-2022
16+
17+
steps:
18+
19+
- name: Check-out
20+
uses: actions/checkout@v4
21+
with:
22+
# This is necessary so that we have the tags.
23+
fetch-depth: 0
24+
25+
- name: Set Build Version
26+
run: |
27+
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length)
28+
$File = (
29+
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "src\Elmish.Uno\Elmish.Uno.fsproj"
30+
)[0].Node
31+
$File.InnerText = $version
32+
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath "src\Elmish.Uno\Elmish.Uno.fsproj"))
33+
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
34+
shell: pwsh
35+
36+
- name: Setup .NET Core
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
dotnet-version: 8.0.x
40+
41+
- name: Install local tools
42+
run: dotnet tool restore
43+
44+
- name: Restore NuGet packages
45+
run: dotnet restore Elmish.Uno.sln
46+
47+
- name: Build
48+
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount
49+
50+
- name: Test
51+
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj
52+
53+
- name: Pack
54+
run: |
55+
cd src/Elmish.Uno
56+
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget
57+
58+
- name: Publish to NuGet
59+
run: |
60+
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate

.github/workflows/pull_request.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,37 @@ on:
66
- opened
77
- synchronize
88

9+
env:
10+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
11+
DOTNET_NOLOGO: true
12+
913
jobs:
1014
build:
1115

12-
runs-on: windows-2022
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest, windows-latest, macOS-latest]
20+
dotnet: [8.0.202]
21+
runs-on: ${{ matrix.os }}
1322

1423
steps:
1524

16-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
1726

18-
- name: Install .NET SDK 6.0.x
19-
uses: actions/setup-dotnet@v1
27+
- name: Setup .NET Core
28+
uses: actions/setup-dotnet@v4
2029
with:
21-
dotnet-version: 6.0.x
30+
dotnet-version: ${{ matrix.dotnet }}
2231

23-
- name: Install MSBuild
24-
uses: microsoft/setup-msbuild@v1.1
25-
with:
26-
#vs-version: '[17.0,)'
27-
vs-prerelease: true
28-
msbuild-architecture: x64
32+
- name: Install local tools
33+
run: dotnet tool restore
2934

3035
- name: Restore NuGet packages
31-
run: nuget restore 'src\\Elmish.Uno.sln' -ConfigFile 'NuGet.Config'
36+
run: dotnet restore Elmish.Uno.sln
3237

33-
- name: Build with MSBuild
34-
run: |
35-
msbuild 'src\\Elmish.Uno.sln' /t:Rebuild /p:Configuration=Release /p:Platform='Any CPU' -p:TargetFramework=net6.0-windows10.0.22000.0 -maxcpucount
36-
msbuild 'src\\Elmish.Uno.sln' /t:Rebuild /p:Configuration=Release /p:Platform='Any CPU' -p:TargetFramework=net6.0 -maxcpucount
38+
- name: Build
39+
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount
3740

3841
- name: Test
3942
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj

Elmish.Uno.nuspec

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

0 commit comments

Comments
 (0)