fix: chocolatey issue and readme install
This commit is contained in:
1 parent
f226358b1c
commit
1dcd625ea2
2 files changed
+33
-17
No files matched your search
@@ -60,6 +60,8 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
package="target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg"
|
||||
version="${{ steps.package.outputs.version }}"
|
||||
public_package_url="https://community.chocolatey.org/packages/mcl-launcher/$version"
|
||||
saw_server_error=false
|
||||
|
||||
for attempt in 1 2 3; do
|
||||
@@ -84,6 +86,14 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
page_file="$RUNNER_TEMP/chocolatey-package-$version.html"
|
||||
page_status="$(curl --location --silent --show-error --output "$page_file" --write-out "%{http_code}" "$public_package_url")"
|
||||
|
||||
if [ "$page_status" = "200" ] && grep -qE "awaiting moderation|remain unlisted until it has been approved|Version History" "$page_file"; then
|
||||
echo "::warning::Chocolatey returned 403, but the public package page for version $version exists and is awaiting moderation; treating this publish as complete."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::error::Chocolatey rejected the push with 403 before any server-side failure. Check CHOCOLATEY_API_KEY ownership/permissions for mcl-launcher."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user