ci: fixed aur checksums and chocolatey workflow

This commit is contained in:
objz committed 2026-04-27 13:17:41 +02:00
1 parent ff7bb55faa
commit de6af2de18
4 files changed
+25 -16

No files matched your search

+1
View File
@@ -55,6 +55,7 @@ jobs:
- name: prepare mcl-launcher-bin
run: |
sed -i "s|^pkgver=.*|pkgver=${{ steps.version.outputs.version }}|" pkg/mcl-launcher-bin/PKGBUILD
sed -i "s|^pkgrel=.*|pkgrel=1|" pkg/mcl-launcher-bin/PKGBUILD
cp pkg/mcl-launcher-bin/PKGBUILD PKGBUILD
rm -f .SRCINFO
+23 -1
View File
@@ -60,12 +60,34 @@ jobs:
shell: bash
run: |
package="target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg"
saw_server_error=false
for attempt in 1 2 3; do
if docker run --rm --workdir /wksp --volume "$PWD:/wksp" ghcr.io/crazy-max/chocolatey push "$package" --source "https://push.chocolatey.org/" --api-key "$CHOCOLATEY_API_KEY" --timeout 2700; then
log_file="$RUNNER_TEMP/chocolatey-push-${attempt}.log"
if docker run --rm --workdir /wksp --volume "$PWD:/wksp" ghcr.io/crazy-max/chocolatey push "$package" --source "https://push.chocolatey.org/" --api-key "$CHOCOLATEY_API_KEY" --timeout 2700 2>&1 | tee "$log_file"; then
exit 0
fi
if grep -q "409 (Conflict)" "$log_file"; then
echo "::warning::Chocolatey package version already exists; treating this publish as complete."
exit 0
fi
if grep -qE "50[0-9] \\(" "$log_file"; then
saw_server_error=true
fi
if grep -q "403 (Forbidden)" "$log_file"; then
if [ "$saw_server_error" = "true" ]; then
echo "::warning::Chocolatey returned 403 after an earlier server error. The previous push may have been accepted and put into 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
if [ "$attempt" -eq 3 ]; then
break
fi
-14
View File
@@ -349,20 +349,6 @@ jobs:
GITHUB_EMAIL: "admin+bot@axo.dev"
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
steps:
- name: Verify Homebrew tap access
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
if [ -z "${GH_TOKEN}" ]; then
echo "::error::HOMEBREW_TAP_TOKEN is required to publish Homebrew formulae to ${HOMEBREW_TAP_REPOSITORY}."
exit 1
fi
if ! gh repo view "${HOMEBREW_TAP_REPOSITORY}" >/dev/null; then
echo "::error::HOMEBREW_TAP_TOKEN cannot access ${HOMEBREW_TAP_REPOSITORY}. Create the tap repository or update HOMEBREW_TAP_TOKEN with access to it."
exit 1
fi
- uses: actions/checkout@v6
with:
persist-credentials: true