1717 verify-package :
1818 runs-on : ubuntu-latest
1919
20+ defaults :
21+ run :
22+ working-directory : packages/dotnet/Gabp.Schemas
23+
2024 steps :
2125 - name : Checkout repository
2226 uses : actions/checkout@v6.0.2
2731 dotnet-version : ' 8.0.x'
2832
2933 - name : Pack .NET schema package
30- run : |
31- dotnet pack packages/dotnet/Gabp.Schemas/Gabp.Schemas.csproj \
32- --configuration Release \
33- --output artifacts/dotnet
34+ run : dotnet pack Gabp.Schemas.csproj --configuration Release --output "$GITHUB_WORKSPACE/artifacts/dotnet"
3435
3536 publish-to-nuget :
3637 needs : verify-package
3940 (github.event_name == 'workflow_dispatch' && inputs.release_tag != '')
4041 runs-on : ubuntu-latest
4142
43+ defaults :
44+ run :
45+ working-directory : packages/dotnet/Gabp.Schemas
46+
4247 steps :
4348 - name : Checkout repository
4449 uses : actions/checkout@v6.0.2
@@ -52,23 +57,20 @@ jobs:
5257 env :
5358 RELEASE_TAG : ${{ github.event.release.tag_name || inputs.release_tag }}
5459 run : |
55- PACKAGE_VERSION="$(dotnet msbuild packages/dotnet/Gabp.Schemas/ Gabp.Schemas.csproj -nologo -getProperty:Version)"
60+ PACKAGE_VERSION="$(dotnet msbuild Gabp.Schemas.csproj -nologo -getProperty:Version)"
5661 if [ "$RELEASE_TAG" != "v$PACKAGE_VERSION" ]; then
5762 echo "Release tag $RELEASE_TAG does not match package version v$PACKAGE_VERSION" >&2
5863 exit 1
5964 fi
6065
6166 - name : Pack .NET schema package
62- run : |
63- dotnet pack packages/dotnet/Gabp.Schemas/Gabp.Schemas.csproj \
64- --configuration Release \
65- --output artifacts/dotnet
67+ run : dotnet pack Gabp.Schemas.csproj --configuration Release --output "$GITHUB_WORKSPACE/artifacts/dotnet"
6668
6769 - name : Publish package to NuGet
6870 env :
6971 NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
7072 run : |
71- dotnet nuget push "artifacts/dotnet/*.nupkg" \
73+ dotnet nuget push "$GITHUB_WORKSPACE"/ artifacts/dotnet/*.nupkg \
7274 --api-key "$NUGET_API_KEY" \
7375 --source "https://api.nuget.org/v3/index.json" \
7476 --skip-duplicate
0 commit comments