Skip to content

Commit fbf67f1

Browse files
committed
Update publish.yml
Some spacing seems off...
1 parent da5aa21 commit fbf67f1

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
runs-on: ubuntu-latest
3333
outputs:
3434
version: ${{ steps.set-version.outputs.version }}
35-
env:
36-
VERSION: ${{ steps.set-version.outputs.version }}
37-
PROJECT_NAME: ${{ github.event.repository.name }}
3835
steps:
3936
- name: Checkout code
4037
uses: actions/checkout@v3
@@ -57,13 +54,13 @@ jobs:
5754
echo "Using version: $VERSION"
5855
echo "version=$VERSION" >> $GITHUB_OUTPUT
5956
60-
- name: Pack NuGet package
57+
- name: Pack NuGet packages
6158
run: |
62-
echo "Packing $PROJECT_NAME version $VERSION"
63-
dotnet pack "src/${PROJECT_NAME}.csproj" \
59+
VERSION=${{ steps.set-version.outputs.version }}
60+
dotnet pack src/${{ github.event.repository.name }}.csproj \
6461
--configuration Release \
6562
--no-build \
66-
-p:PackageVersion="$VERSION" \
63+
-p:PackageVersion=$VERSION \
6764
-p:IncludeSymbols=true \
6865
-p:SymbolPackageFormat=snupkg
6966
@@ -72,20 +69,18 @@ jobs:
7269

7370
- name: Push NuGet packages
7471
run: |
75-
echo "Pushing nupkg files..."
76-
find src/bin/Release -name "*.nupkg" ! -name "*.symbols.nupkg" ! -name "*.snupkg" -print0 | while IFS= read -r -d '' pkg; do
72+
for pkg in $(find src/bin/Release -name "*.nupkg" ! -name "*.symbols.nupkg" ! -name "*.snupkg"); do
7773
echo "Pushing main package: $pkg"
7874
dotnet nuget push "$pkg" \
7975
--api-key "${{ secrets.NUGET_API_KEY }}" \
8076
--source https://api.nuget.org/v3/index.json \
8177
--skip-duplicate
8278
done
8379
84-
echo "Pushing symbol packages..."
85-
find src/bin/Release -name "*.snupkg" -print0 | while IFS= read -r -d '' symbols; do
80+
for symbols in $(find src/bin/Release -name "*.snupkg"); do
8681
echo "Pushing symbol package: $symbols"
8782
dotnet nuget push "$symbols" \
8883
--api-key "${{ secrets.NUGET_API_KEY }}" \
8984
--source https://api.nuget.org/v3/index.json \
9085
--skip-duplicate
91-
done
86+
done

0 commit comments

Comments
 (0)