More pipeline fixes (#11)

This commit is contained in:
Patrick Stevens
2024-06-17 22:09:38 +01:00
committed by GitHub
parent a164f3e237
commit e0e06582c5
2 changed files with 7 additions and 1 deletions

View File

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

View File

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