From c0466121ae60ea5176a041acad6f6dc29b82b6b5 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 8 Jul 2020 11:10:18 +0200 Subject: [PATCH] Create NuGet packages on GitHub Actions * fixes #26 --- .github/workflows/build.yml | 17 +++++++++++++++-- BuildNugetPackages.cmd | 4 ++-- KuduSync.NET/KuduSync.NET.csproj | 31 +++++++++++++++++-------------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eceffd1..4333f5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,8 @@ on: jobs: build: name: Build + env: + TERM: xterm-256color runs-on: ${{ matrix.os }} strategy: matrix: @@ -25,9 +27,20 @@ jobs: - name: Build KuduSync.NET run: | - dotnet build + dotnet build -p:Configuration=Release - - name: Test + - name: Test Windows if: matrix.os == 'windows-latest' shell: cmd run: .\test.cmd + + - name: Create NuGet Packages + if: matrix.os == 'windows-latest' + shell: cmd + run: .\BuildNugetPackages.cmd + + - uses: actions/upload-artifact@v2 + if: matrix.os == 'windows-latest' + with: + name: nupkg + path: artifacts \ No newline at end of file diff --git a/BuildNugetPackages.cmd b/BuildNugetPackages.cmd index 47ee7c1..7798114 100644 --- a/BuildNugetPackages.cmd +++ b/BuildNugetPackages.cmd @@ -6,5 +6,5 @@ set corefx="netcoreapp3.1" set project=".\KuduSync.NET\KuduSync.NET.csproj" set output=".\artifacts" -dotnet pack /p:TargetFramework=%corefx% /p:TargetFrameworks=%corefx% %project% --output "%output%" -dotnet pack /p:TargetFramework=%netfx% /p:TargetFrameworks=%netfx% %project% --output "%output%" \ No newline at end of file +dotnet pack /p:Configuration=Release /p:TargetFramework=%corefx% /p:TargetFrameworks=%corefx% %project% --output "%output%" +dotnet pack /p:Configuration=Release /p:TargetFramework=%netfx% /p:TargetFrameworks=%netfx% %project% --output "%output%" \ No newline at end of file diff --git a/KuduSync.NET/KuduSync.NET.csproj b/KuduSync.NET/KuduSync.NET.csproj index 5b90b52..80ce7ad 100644 --- a/KuduSync.NET/KuduSync.NET.csproj +++ b/KuduSync.NET/KuduSync.NET.csproj @@ -15,12 +15,28 @@ amitap Tool for syncing files for deployment, will only copy changed files and delete files that doesn't exists in the destination but only if they were part of the previous deployment. + + + false + NU5128 + $(AssemblyName) + + + + true + KuduSync.Tool + kudusync + .NET Global $(PackageDescription). + + full + pdbonly + @@ -44,19 +60,6 @@ - + - - - false - NU5128 - $(AssemblyName) - - - - true - KuduSync.Tool - kudusync - .NET Global $(PackageDescription). - \ No newline at end of file