forked from unoplatform/Elmish.Uno
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated the library to Uno 5.1 and .NET 8
- Loading branch information
1 parent
d8c3e19
commit bf065d8
Showing
25 changed files
with
410 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Publish to MyGet | ||
|
||
on: | ||
push: | ||
branches: | ||
- uno | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_NOLOGO: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-2022 | ||
|
||
steps: | ||
|
||
- name: Check-out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Build Version | ||
run: | | ||
cd src/Elmish.Uno | ||
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length) | ||
$File = ( | ||
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path Elmish.Uno.fsproj | ||
)[0].Node | ||
$File.InnerText = $version | ||
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Elmish.Uno.fsproj)) | ||
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
shell: pwsh | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Add the GitHub and MyGet sources | ||
run: | | ||
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" | ||
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" | ||
- name: Install local tools | ||
run: dotnet tool restore | ||
|
||
- name: Restore NuGet packages | ||
run: dotnet restore Elmish.Uno.sln | ||
|
||
- name: Build | ||
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount | ||
|
||
- name: Test | ||
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj | ||
|
||
- name: Pack | ||
run: | | ||
cd src/Elmish.Uno | ||
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget | ||
- name: Publish to MyGet | ||
run: | | ||
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate | ||
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "myget.org" -k ${{secrets.MYGET_SECRET}} --skip-duplicate | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Publish to NuGet | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'releases/*' | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_NOLOGO: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-2022 | ||
|
||
steps: | ||
|
||
- name: Check-out | ||
uses: actions/checkout@v4 | ||
with: | ||
# This is necessary so that we have the tags. | ||
fetch-depth: 0 | ||
|
||
- name: Set Build Version | ||
run: | | ||
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length) | ||
$File = ( | ||
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "src\Elmish.Uno\Elmish.Uno.fsproj" | ||
)[0].Node | ||
$File.InnerText = $version | ||
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath "src\Elmish.Uno\Elmish.Uno.fsproj")) | ||
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
shell: pwsh | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install local tools | ||
run: dotnet tool restore | ||
|
||
- name: Restore NuGet packages | ||
run: dotnet restore Elmish.Uno.sln | ||
|
||
- name: Build | ||
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount | ||
|
||
- name: Test | ||
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj | ||
|
||
- name: Pack | ||
run: | | ||
cd src/Elmish.Uno | ||
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget | ||
- name: Publish to NuGet | ||
run: | | ||
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,34 +6,37 @@ on: | |
- opened | ||
- synchronize | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_NOLOGO: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-2022 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
dotnet: [8.0.202] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install .NET SDK 6.0.x | ||
uses: actions/setup-dotnet@v1 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
dotnet-version: ${{ matrix.dotnet }} | ||
|
||
- name: Install MSBuild | ||
uses: microsoft/[email protected] | ||
with: | ||
#vs-version: '[17.0,)' | ||
vs-prerelease: true | ||
msbuild-architecture: x64 | ||
- name: Install local tools | ||
run: dotnet tool restore | ||
|
||
- name: Restore NuGet packages | ||
run: nuget restore 'src\\Elmish.Uno.sln' -ConfigFile 'NuGet.Config' | ||
run: dotnet restore Elmish.Uno.sln | ||
|
||
- name: Build with MSBuild | ||
run: | | ||
msbuild 'src\\Elmish.Uno.sln' /t:Rebuild /p:Configuration=Release /p:Platform='Any CPU' -p:TargetFramework=net6.0-windows10.0.22000.0 -maxcpucount | ||
msbuild 'src\\Elmish.Uno.sln' /t:Rebuild /p:Configuration=Release /p:Platform='Any CPU' -p:TargetFramework=net6.0 -maxcpucount | ||
- name: Build | ||
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount | ||
|
||
- name: Test | ||
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.