diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml index 5898596..4374de4 100644 --- a/.github/workflows/nuget-release.yml +++ b/.github/workflows/nuget-release.yml @@ -30,27 +30,11 @@ jobs: run: git clone https://github.com/Ujinjinjin/upm-preparator.git --branch v1.0.12 --single-branch - name: create temp directory - run: mkdir temp temp/com.sebaslab.svelto.common temp/com.sebaslab.svelto.ecs temp/bin temp/bin/debug temp/bin/release - - - name: copy solution file - run: cp Svelto.ECS.sln "temp/Svelto.ECS.sln" - - # Prepare solution - - name: copy Svelto.Common files to temp directory - run: cp -r Svelto.Common/* "temp/com.sebaslab.svelto.common" - - - name: copy Svelto.ECS files to temp directory - run: cp -r Svelto.ECS/* "temp/com.sebaslab.svelto.ecs" - - # - name: add Svelto.Common to solution - # run: dotnet sln "temp/${PKG_NAME}.sln" add "temp/com.sebaslab.svelto.common/Svelto.Common.csproj" - - # - name: add Svelto.ECS to solution - # run: dotnet sln "temp/${PKG_NAME}.sln" add "temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj" + run: mkdir temp temp/bin temp/bin/debug temp/bin/release # Build for Debug - name: create package for Debug configuration - run: dotnet pack /p:Version=1.0.0 -o temp/bin/debug temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Debug + run: dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/debug Svelto.ECS/Svelto.ECS.csproj -c Debug - name: unzip debug nuget package run: unzip temp/bin/debug/Svelto.ECS.1.0.0.nupkg -d temp/bin/debug @@ -60,7 +44,7 @@ jobs: # Build for Release - name: create package for Release configuration - run: dotnet pack /p:Version=1.0.0 -o temp/bin/release temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Release + run: dotnet pack /p:PackageVersion=1.0.0 -o temp/bin/release Svelto.ECS/Svelto.ECS.csproj -c Release - name: unzip release nuget package run: unzip temp/bin/release/Svelto.ECS.1.0.0.nupkg -d temp/bin/release @@ -73,7 +57,7 @@ jobs: run: python3 upm-preparator/version.py --version-file "${ECS_VERSION_JSON}" --env-file "${GITHUB_ENV}" - name: build nuget package - run: sudo dotnet pack /p:PackageVersion=${PKG_VERSION} -o . temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Custom + run: sudo dotnet pack /p:PackageVersion=${PKG_VERSION} -o . Svelto.ECS/Svelto.ECS.csproj -c NugetPack - # - 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 + - 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 dcb0047..00f218a 100644 --- a/Makefile +++ b/Makefile @@ -2,23 +2,21 @@ pkg_name := "Svelto.ECS" nuget_pack: make nuget_clean - mkdir temp temp/com.sebaslab.svelto.common temp/com.sebaslab.svelto.ecs temp/bin temp/bin/debug temp/bin/release - dotnet new sln -n ${pkg_name} -o temp/ - cp -r Svelto.Common/* temp/com.sebaslab.svelto.common - cp -r Svelto.ECS/* temp/com.sebaslab.svelto.ecs - dotnet sln temp/${pkg_name}.sln add temp/com.sebaslab.svelto.common/Svelto.Common.csproj - dotnet sln temp/${pkg_name}.sln add temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj + mkdir temp temp/bin temp/bin/debug temp/bin/release + # Build for Debug - dotnet pack /p:Version=1.0.0 -o temp/bin/debug temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c 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 cp temp/bin/debug/lib/netstandard2.0/Svelto.ECS.dll temp/bin/debug + # Build for Release - dotnet pack /p:Version=1.0.0 -o temp/bin/release temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c 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 cp temp/bin/release/lib/netstandard2.0/Svelto.ECS.dll temp/bin/release + # Compile into nuget - dotnet pack /p:PackageVersion=2.0.0 -o . temp/com.sebaslab.svelto.ecs/Svelto.ECS.csproj -c Custom + dotnet pack /p:PackageVersion=2.0.0 -o . Svelto.ECS/Svelto.ECS.csproj -c NugetPack make nuget_clean nuget_clean: - rm -rf upm-preparator temp \ No newline at end of file + rm -rf temp \ No newline at end of file diff --git a/Svelto.ECS/Svelto.ECS.csproj b/Svelto.ECS/Svelto.ECS.csproj index 982670d..c5de002 100644 --- a/Svelto.ECS/Svelto.ECS.csproj +++ b/Svelto.ECS/Svelto.ECS.csproj @@ -1,14 +1,15 @@ - + Svelto.ECS 8 netstandard2.0 Svelto 3.2.1 + 3.2.1 Svelto.ECS - sebas77 + Sebastiano Mandala https://github.com/sebas77/Svelto.ECS @@ -21,10 +22,18 @@ false true + + Svelto.ECS.nuspec + version=$(PackageVersion) + AnyCPU + false + true + - + + \ No newline at end of file diff --git a/Svelto.ECS/Svelto.ECS.nuspec b/Svelto.ECS/Svelto.ECS.nuspec index 24006c2..b7d7bf8 100644 --- a/Svelto.ECS/Svelto.ECS.nuspec +++ b/Svelto.ECS/Svelto.ECS.nuspec @@ -14,7 +14,7 @@ - - + +