ci: fixed aur checksums and chocolatey workflow
This commit is contained in:
1 parent
ff7bb55faa
commit
de6af2de18
4 files changed
+25
-16
No files matched your search
@@ -55,6 +55,7 @@ jobs:
|
|||||||
- name: prepare mcl-launcher-bin
|
- name: prepare mcl-launcher-bin
|
||||||
run: |
|
run: |
|
||||||
sed -i "s|^pkgver=.*|pkgver=${{ steps.version.outputs.version }}|" pkg/mcl-launcher-bin/PKGBUILD
|
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
|
cp pkg/mcl-launcher-bin/PKGBUILD PKGBUILD
|
||||||
rm -f .SRCINFO
|
rm -f .SRCINFO
|
||||||
|
|
||||||
|
|||||||
@@ -60,12 +60,34 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
package="target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg"
|
package="target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg"
|
||||||
|
saw_server_error=false
|
||||||
|
|
||||||
for attempt in 1 2 3; do
|
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
|
exit 0
|
||||||
fi
|
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
|
if [ "$attempt" -eq 3 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -349,20 +349,6 @@ jobs:
|
|||||||
GITHUB_EMAIL: "admin+bot@axo.dev"
|
GITHUB_EMAIL: "admin+bot@axo.dev"
|
||||||
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
||||||
steps:
|
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
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: objz <me@objz.dev>
|
# Maintainer: objz <me@objz.dev>
|
||||||
pkgname=mcl-launcher-bin
|
pkgname=mcl-launcher-bin
|
||||||
pkgver=0.2.0
|
pkgver=0.2.0
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Minecraft launcher TUI"
|
pkgdesc="Minecraft launcher TUI"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
url="https://github.com/objz/mcl"
|
url="https://github.com/objz/mcl"
|
||||||
|
|||||||
Reference in new issue
Block a user