Browse Source

packing readme file with nuget

pull/73/head
Camille Galladjov 2 years ago
parent
commit
bf708c2637
No known key found for this signature in database GPG Key ID: C8DB6D39B1B47A0A
3 changed files with 13 additions and 7 deletions
  1. +5
    -1
      .github/workflows/nuget-release.yml
  2. +6
    -6
      Makefile
  3. +2
    -0
      com.sebaslab.svelto.ecs/Svelto.ECS.nuspec

+ 5
- 1
.github/workflows/nuget-release.yml View File

@@ -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

+ 6
- 6
Makefile View File

@@ -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

+ 2
- 0
com.sebaslab.svelto.ecs/Svelto.ECS.nuspec View File

@@ -11,10 +11,12 @@
<dependencies>
<group targetFramework="netstandard2.0" />
</dependencies>
<readme>docs/README.md</readme>
</metadata>
<files>
<file src="Svelto.ECS.targets" target="build/" />
<file src="../temp/bin/debug/Svelto.ECS.dll" target="lib/Debug/netstandard2.0/" />
<file src="../temp/bin/release/Svelto.ECS.dll" target="lib/Release/netstandard2.0/" />
<file src="../README.md" target="docs/" />
</files>
</package>

Loading…
Cancel
Save