Skip to content

Auto commit: Nuget updates #786

Auto commit: Nuget updates

Auto commit: Nuget updates #786

name: .NET Core Build
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
DOTNET_VERSION: 'net8.0'
DOTNET_FRAMEWORK_VERSION: '8.x'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET ${{ env.DOTNET_FRAMEWORK_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_FRAMEWORK_VERSION }}
- name: Clean
run: dotnet clean ./src/SqlBuildManager.Console/sbm.csproj --configuration Release && dotnet nuget locals all --clear
- name: Clean
run: dotnet clean ./src/SqlSync/SQLSync.csproj --configuration Release && dotnet nuget locals all --clear
- name: Restore and build console app
run: dotnet build ./src/SqlBuildManager.Console/sbm.csproj --configuration Release -f ${{ env.DOTNET_VERSION }}
- name: Restore and build desktop app
run: dotnet build ./src/SqlSync/SQLSync.csproj --configuration Release -f ${{ env.DOTNET_VERSION }}-windows
# Run tests
- name: Run SqlBuildManager.Console.UnitTest
run: dotnet test ./src/SqlBuildManager.Console.UnitTest/SqlBuildManager.Console.UnitTest.csproj --configuration Release
- name: Run SqlBuildManager.Enterprise.UnitTest
run: dotnet test ./src/SqlBuildManager.Enterprise.UnitTest/SqlBuildManager.Enterprise.UnitTest.csproj --configuration Release
- name: Run SqlBuildManager.ScriptHandling.UnitTest
run: dotnet test ./src/SqlBuildManager.ScriptHandling.UnitTest/SqlBuildManager.ScriptHandling.UnitTest.csproj --configuration Release
- name: Run SqlSync.Connection.UnitTest
run: dotnet test ./src/SqlSync.Connection.UnitTest/SqlSync.Connection.UnitTest.csproj --configuration Release
- name: Run SqlSync.ObjectScript.UnitTest
run: dotnet test ./src/SqlSync.ObjectScript.UnitTest/SqlSync.ObjectScript.UnitTest.csproj --configuration Release
- name: Run SqlSync.SqlBuild.UnitTest
run: dotnet test ./src/SqlSync.SqlBuild.UnitTest/SqlSync.SqlBuild.UnitTest.csproj --configuration Release
# .NET 7.0 pubish
- name: Publish the Windows desktop app
run: dotnet publish ./src/SqlSync/SqlSync.csproj -r win-x64 --configuration Release -f ${{ env.DOTNET_VERSION }}-windows
- name: Publish the Windows CLI app
run: dotnet publish ./src/SqlBuildManager.Console/sbm.csproj -r win-x64 --configuration Release -f ${{ env.DOTNET_VERSION }} --self-contained
- name: Publish the Linux CLI app
run: dotnet publish ./src/SqlBuildManager.Console/sbm.csproj -r linux-x64 --configuration Release -f ${{ env.DOTNET_VERSION }} --self-contained
# .NET 7 artifacts
- name: Upload a Build Artifact sbm-windows
uses: actions/upload-artifact@v4
with:
name: sbm-windows-${{ env.DOTNET_VERSION }}
path: "./src/SqlBuildManager.Console/bin/Release/${{ env.DOTNET_VERSION }}/win-x64/publish"
- name: Upload a Build Artifact sbm-linux
uses: actions/upload-artifact@v4
with:
name: sbm-linux-${{ env.DOTNET_VERSION }}
path: "./src/SqlBuildManager.Console/bin/Release/${{ env.DOTNET_VERSION }}/linux-x64/publish"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: SqlBuildManager Desktop ${{ env.DOTNET_VERSION }}
path: "./src/SqlSync/bin/Release/${{ env.DOTNET_VERSION }}-windows/win-x64/publish"