Skip to content

Commit

Permalink
try-again
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug123 committed Jun 17, 2024
1 parent a164f3e commit 1c4779a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/assert-contents.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

echo "Unzipping version from NuGet"
ls from-nuget.nupkg
mkdir from-nuget && cp from-nuget.nupkg from-nuget/zip.zip && cd from-nuget && unzip zip.zip && cd - || exit 1

echo "Unzipping version from local build"
ls packed/
mkdir from-local && cp packed/*.nupkg from-local/zip.zip && cd from-local && unzip zip.zip && cd - || exit 1

find from-local -type f -exec sha256sum {} \; | sort > from-local.txt
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nuget-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"

tmp=$(mktemp)

if ! dotnet nuget push "$SOURCE_NUPKG" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate > "$tmp" ; then
if ! dotnet nuget push "$SOURCE_NUPKG" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json > "$tmp" ; then
cat "$tmp"
if grep 'already exists at feed' "$tmp" ; then
echo "result=skipped" >> "$GITHUB_OUTPUT"
Expand All @@ -19,4 +19,6 @@ if ! dotnet nuget push "$SOURCE_NUPKG" --api-key "$NUGET_API_KEY" --source https
fi
fi

cat "$tmp"

echo "result=published" >> "$GITHUB_OUTPUT"

0 comments on commit 1c4779a

Please sign in to comment.