From bf708c263785b1cc4f28473014e9689340db3fee Mon Sep 17 00:00:00 2001 From: Camille Galladjov Date: Tue, 3 May 2022 14:12:34 +0300 Subject: [PATCH] packing readme file with nuget --- .github/workflows/nuget-release.yml | 6 +++++- Makefile | 12 ++++++------ com.sebaslab.svelto.ecs/Svelto.ECS.nuspec | 2 ++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml index e151ca8..f0a1ba5 100644 --- a/.github/workflows/nuget-release.yml +++ b/.github/workflows/nuget-release.yml @@ -56,9 +56,13 @@ jobs: run: sudo cp temp/bin/release/lib/netstandard2.0/Svelto.ECS.dll temp/bin/release # Compile into nuget package - - name: build nuget package run: sudo dotnet pack /p:PackageVersion=${PKG_VERSION} -o . com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c NugetPack + - uses: actions/upload-artifact@v3 + with: + name: ${{ env.PKG_NAME }}.${{ env.PKG_VERSION }}.nupkg + path: ${{ env.PKG_NAME }}.${{ env.PKG_VERSION }}.nupkg + - name: publish nuget package run: dotnet nuget push ${{ env.PKG_NAME }}.${{ env.PKG_VERSION }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json diff --git a/Makefile b/Makefile index 00f218a..602ec13 100644 --- a/Makefile +++ b/Makefile @@ -5,18 +5,18 @@ nuget_pack: mkdir temp temp/bin temp/bin/debug temp/bin/release # Build for Debug - dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/debug Svelto.ECS/Svelto.ECS.csproj -c Debug - unzip temp/bin/debug/Svelto.ECS.1.0.0.nupkg -d temp/bin/debug + dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/debug com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Debug + unzip "temp/bin/debug/${pkg_name}.1.0.0.nupkg" -d temp/bin/debug cp temp/bin/debug/lib/netstandard2.0/Svelto.ECS.dll temp/bin/debug # Build for Release - dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/release Svelto.ECS/Svelto.ECS.csproj -c Release - unzip temp/bin/release/Svelto.ECS.1.0.0.nupkg -d temp/bin/release + dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/release com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Release + unzip "temp/bin/release/${pkg_name}.1.0.0.nupkg" -d temp/bin/release cp temp/bin/release/lib/netstandard2.0/Svelto.ECS.dll temp/bin/release # Compile into nuget - dotnet pack /p:PackageVersion=2.0.0 -o . Svelto.ECS/Svelto.ECS.csproj -c NugetPack - make nuget_clean + dotnet pack /p:PackageVersion=2.0.0 -o . com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c NugetPack + # make nuget_clean nuget_clean: rm -rf temp \ No newline at end of file diff --git a/com.sebaslab.svelto.ecs/Svelto.ECS.nuspec b/com.sebaslab.svelto.ecs/Svelto.ECS.nuspec index b7d7bf8..cbbeac1 100644 --- a/com.sebaslab.svelto.ecs/Svelto.ECS.nuspec +++ b/com.sebaslab.svelto.ecs/Svelto.ECS.nuspec @@ -11,10 +11,12 @@ + docs/README.md +