Skip to content

Commit

Permalink
Update build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Nov 3, 2023
1 parent f37389e commit 64102bd
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 20 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: .NET

on:
push:
branches: [ main ]
branches: [ main, dev/* ]
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -47,10 +47,22 @@ jobs:
run: dotnet test
working-directory: uSync.Migrations.Tests

- name: Dotnet Pack
- name: Dotnet Pack (Core)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Core

- name: Dotnet Pack (Client)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Client

- name: Dotnet Pack (Migrators)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Migrators

- name: Dotnet Pack (Main package)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations

- name: Upload nuget file as build artifact
uses: actions/upload-artifact@v2
with:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,22 @@ jobs:
run: dotnet test
working-directory: uSync.Migrations.Tests

- name: Dotnet Pack
- name: Dotnet Pack (Core)
run: dotnet pack --configuration Release --output ../build.out/ /p:version=${{ steps.gitversion.outputs.NuGetVersionV2 }}
working-directory: uSync.Migrations.Core

- name: Dotnet Pack (Client)
run: dotnet pack --configuration Release --output ../build.out/ /p:version=${{ steps.gitversion.outputs.NuGetVersionV2 }}
working-directory: uSync.Migrations.Client

- name: Dotnet Pack (Migrators)
run: dotnet pack --configuration Release --output ../build.out/ /p:version=${{ steps.gitversion.outputs.NuGetVersionV2 }}
working-directory: uSync.Migrations.Migrators

- name: Dotnet Pack (Parent Package)
run: dotnet pack --configuration Release --output ../build.out/ /p:version=${{ steps.gitversion.outputs.NuGetVersionV2 }}
working-directory: uSync.Migrations

# - name: Push to Nuget Repo
# working-directory: build.out
# run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}}
Expand Down
5 changes: 4 additions & 1 deletion dist/build-package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ dotnet build ..\uSyncMigrations.sln -c $env /p:$buildParams

""; "##### Packaging"; "----------------------------------" ; ""

dotnet pack ..\uSync.Migrations\uSync.Migrations.csproj --no-restore --no-build -c $env -o $outFolder /p:$buildParams
dotnet pack ..\uSync.Migrations.Core\uSync.Migrations.Core.csproj --no-restore --no-build -c $env -o $outFolder -p:$buildParams
dotnet pack ..\uSync.Migrations.Clients\uSync.Migrations.Client.csproj --no-restore --no-build -c $env -o $outFolder -p:$buildParams
dotnet pack ..\uSync.Migrations.Migrators\uSync.Migrations.Migrators.csproj --no-restore --no-build -c $env -o $outFolder -p:$buildParams
dotnet pack ..\uSync.Migrations\uSync.Migrations.csproj --no-restore --no-build -c $env -o $outFolder -p:$buildParams

## will copy to c:\source\localgit (assuming it exists)

Expand Down
2 changes: 1 addition & 1 deletion uSync.Migrations.Client/uSync.Migrations.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
4 changes: 2 additions & 2 deletions uSync.Migrations.Core/uSync.Migrations.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
10 changes: 1 addition & 9 deletions uSync.Migrations/uSync.Migrations.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StaticWebAssetBasePath>App_Plugins</StaticWebAssetBasePath>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -12,13 +11,6 @@
<Description>Migration tool for Umbraco Runs on 10+ migrates from 7</Description>
</PropertyGroup>

<ItemGroup>
<Compile Remove="__Migrators\**" />
<Content Remove="__Migrators\**" />
<EmbeddedResource Remove="__Migrators\**" />
<None Remove="__Migrators\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[10.4,14)" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[10.4,14)" />
Expand Down
7 changes: 6 additions & 1 deletion uSyncMigrations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.Migrations.Migrators"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.Migrations.Core", "uSync.Migrations.Core\uSync.Migrations.Core.csproj", "{0F6C6938-AB6A-400B-A0E0-44C7D9DAC9DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.Migrations.Client", "uSync.Migrations.Client\uSync.Migrations.Client.csproj", "{DD65BF5B-E1B5-4595-9904-8B52B80A73FD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.Migrations.Client", "uSync.Migrations.Client\uSync.Migrations.Client.csproj", "{DD65BF5B-E1B5-4595-9904-8B52B80A73FD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C83F8979-6D30-4926-9AC1-16F8E8C47BAC}"
ProjectSection(SolutionItems) = preProject
dist\build-package.ps1 = dist\build-package.ps1
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 64102bd

Please sign in to comment.