Fixe msbuild issue in workflow
All checks were successful
Publish NuGet Packages / publish (push) Successful in 1m24s
All checks were successful
Publish NuGet Packages / publish (push) Successful in 1m24s
This commit is contained in:
@@ -40,14 +40,16 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
|
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
set -x
|
||||||
|
set +e
|
||||||
for projfile in $(find . -name "*.csproj"); do
|
for projfile in $(find . -name "*.csproj"); do
|
||||||
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
|
if grep -q "<IsPackable>true</IsPackable>" "$projfile"; then
|
||||||
if [ "$packable" = "True" ]; then
|
|
||||||
projname=$(basename "$projfile" .csproj)
|
projname=$(basename "$projfile" .csproj)
|
||||||
VERSION=$(dotnet msbuild "$projfile" -nologo -v:q -t:GetProperty -p:PropertyName=PackageVersion)
|
echo "Checking $projname..."
|
||||||
pkg=$(find "$projname/bin/Release" -maxdepth 1 -type f \
|
pkg=$(find "$projname/bin/Release" -maxdepth 1 -type f \
|
||||||
-name "$projname.*.nupkg" ! -name "*.symbols.nupkg" | sort -V | tail -n1)
|
-name "$projname.*.nupkg" ! -name "*.symbols.nupkg" | sort -V | tail -n1)
|
||||||
if [ -n "$pkg" ]; then
|
if [ -n "$pkg" ]; then
|
||||||
|
echo "Pushing $pkg"
|
||||||
dotnet nuget push "$pkg" \
|
dotnet nuget push "$pkg" \
|
||||||
--source "https://git.personalnas.com/api/packages/Misaki/nuget/index.json" \
|
--source "https://git.personalnas.com/api/packages/Misaki/nuget/index.json" \
|
||||||
--api-key "$NUGET_API_KEY"
|
--api-key "$NUGET_API_KEY"
|
||||||
|
|||||||
Reference in New Issue
Block a user