Updated GA script. #119
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
name: .NET | |
on: [push] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: [self-hosted, windows, x64] | |
#runs-on: windows-latest | |
steps: | |
#----------------------------------------------------------------------- | |
# Checkout | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# lfs: true | |
#- name: Checkout LFS objects | |
# run: git lfs checkout | |
- name: Extract branch name | |
id: extract_branch_name | |
# if: startsWith( github.ref, 'refs/tags/' ) | |
run: | | |
$branch_name=$(git name-rev --name-only --exclude=tags/* HEAD) | |
echo "Detected current branch: ${branch_name}" | |
echo "::set-output name=branch_name::${branch_name}" | |
#----------------------------------------------------------------------- | |
# Setup environments | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | |
2.2.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Setup NuGet package reference | |
run: | | |
dotnet nuget add source ${{secrets.GH_LOCAL_NUGET_URL}} -n ref1 -u ${{secrets.GH_LOCAL_NUGET_USER}} -p ${{secrets.GH_LOCAL_NUGET_PASSWORD}} --store-password-in-clear-text --configfile nuget.config | |
# dotnet nuget add source ${{secrets.GH_NUGET_URL}} -n ref2 -u ${{secrets.GH_NUGET_USER}} -p ${{secrets.GH_NUGET_PASSWORD}} --store-password-in-clear-text --configfile nuget.config | |
#----------------------------------------------------------------------- | |
# Build | |
- name: Build | |
run: | | |
dotnet build -p:Configuration=Release Epoxy-build.sln | |
- name: Build NuGet packages | |
run: | | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.Wpf\Epoxy.Core.Wpf.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.Xamarin.Forms\Epoxy.Core.Xamarin.Forms.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.Avalonia\Epoxy.Core.Avalonia.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.Avalonia11\Epoxy.Core.Avalonia11.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.OpenSilver\Epoxy.Core.OpenSilver.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.Uwp\Epoxy.Core.Uwp.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Core.WinUI\Epoxy.Core.WinUI.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Build\Epoxy.Build.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Wpf\Epoxy.Wpf.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Xamarin.Forms\Epoxy.Xamarin.Forms.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Avalonia\Epoxy.Avalonia.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Avalonia11\Epoxy.Avalonia11.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.OpenSilver\Epoxy.OpenSilver.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.Uwp\Epoxy.Uwp.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\Epoxy.WinUI\Epoxy.WinUI.csproj | |
dotnet pack -p:Configuration=Release -o artifacts src\FSharp.Epoxy.Wpf\FSharp.Epoxy.Wpf.fsproj | |
dotnet pack -p:Configuration=Release -o artifacts src\FSharp.Epoxy.Avalonia\FSharp.Epoxy.Avalonia.fsproj | |
dotnet pack -p:Configuration=Release -o artifacts src\FSharp.Epoxy.Avalonia11\FSharp.Epoxy.Avalonia11.fsproj | |
dotnet pack -p:Configuration=Release -o artifacts src\FSharp.Epoxy.OpenSilver\FSharp.Epoxy.OpenSilver.fsproj | |
dotnet build -p:Configuration=Release templates\Epoxy.Templates.csproj | |
dotnet pack -p:Configuration=Release -o artifacts templates\Epoxy.Templates.csproj | |
#----------------------------------------------------------------------- | |
# Test | |
- name: Test | |
run: | | |
dotnet test --verbosity normal -p:Configuration=Release -p:CITest=True tests\Epoxy.Build.Tests\Epoxy.Build.Tests.csproj | |
timeout-minutes: 10 | |
#----------------------------------------------------------------------- | |
# Deploy packages (develop) | |
- name: Deploy NuGet package (develop/ref1) | |
if: startsWith( github.ref, 'refs/tags/' ) | |
run: | | |
dotnet nuget push artifacts\Epoxy.Core.Wpf.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Core.Xamarin.Forms.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Core.Avalonia.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Core.Avalonia11.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Core.OpenSilver.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Build.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Wpf.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Xamarin.Forms.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Avalonia.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Avalonia11.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.OpenSilver.*.nupkg --source ref1 | |
dotnet nuget push artifacts\FSharp.Epoxy.Wpf.*.nupkg --source ref1 | |
dotnet nuget push artifacts\FSharp.Epoxy.Avalonia.*.nupkg --source ref1 | |
dotnet nuget push artifacts\FSharp.Epoxy.Avalonia11.*.nupkg --source ref1 | |
dotnet nuget push artifacts\FSharp.Epoxy.OpenSilver.*.nupkg --source ref1 | |
dotnet nuget push artifacts\Epoxy.Templates.*.nupkg --source ref1 | |
#----------------------------------------------------------------------- | |
# Deploy packages (main) | |
#- name: Deploy NuGet package (main/ref2) | |
# if: (startsWith( github.ref, 'refs/tags/' )) && (endsWith(steps.extract_branch_name.outputs.branch_name, 'main')) | |
# run: | | |
# dotnet nuget push artifacts\Epoxy.Core.Wpf.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.Xamarin.Forms.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.Avalonia.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.Avalonia11.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.OpenSilver.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.Uwp.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Core.WinUI.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Build.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Wpf.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Xamarin.Forms.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Avalonia.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Avalonia11.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.OpenSilver.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Uwp.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.WinUI.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\FSharp.Epoxy.Wpf.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\FSharp.Epoxy.Avalonia.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\FSharp.Epoxy.Avalonia11.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\FSharp.Epoxy.OpenSilver.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} | |
# dotnet nuget push artifacts\Epoxy.Templates.*.nupkg --source ref2 --api-key ${{secrets.GH_NUGET_APIKEY}} |