ci: fixed chocolatey workflow and hombrew

This commit is contained in:
objz committed 2026-04-27 12:51:29 +02:00
1 parent 3d8b3deb74
commit 495a4b3fa1
2 files changed
+43 -9

No files matched your search

+17 -3
View File
@@ -57,6 +57,20 @@ jobs:
args: pack ${{ steps.package.outputs.package_dir }}/mcl-launcher.nuspec --version ${{ steps.package.outputs.version }} --output-directory target/chocolatey/out
- name: push Chocolatey package
uses: crazy-max/ghaction-chocolatey@v4
with:
args: push target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg --source "https://push.chocolatey.org/" --api-key "${{ secrets.CHOCOLATEY_API_KEY }}" --timeout 2700
shell: bash
run: |
package="target/chocolatey/out/mcl-launcher.${{ steps.package.outputs.version }}.nupkg"
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
exit 0
fi
if [ "$attempt" -eq 3 ]; then
break
fi
sleep $((attempt * 30))
done
exit 1
+26 -6
View File
@@ -303,13 +303,33 @@ jobs:
| [mcl-launcher-aarch64-unknown-linux-gnu.tar.xz](https://github.com/objz/mcl/releases/download/${RELEASE_TAG}/mcl-launcher-aarch64-unknown-linux-gnu.tar.xz) | ARM64 Linux | [checksum](https://github.com/objz/mcl/releases/download/${RELEASE_TAG}/mcl-launcher-aarch64-unknown-linux-gnu.tar.xz.sha256) |
| [mcl-launcher-x86_64-unknown-linux-gnu.tar.xz](https://github.com/objz/mcl/releases/download/${RELEASE_TAG}/mcl-launcher-x86_64-unknown-linux-gnu.tar.xz) | x64 Linux | [checksum](https://github.com/objz/mcl/releases/download/${RELEASE_TAG}/mcl-launcher-x86_64-unknown-linux-gnu.tar.xz.sha256) |
## Package Managers
## Cargo
\`\`\`sh
\`\`\`
cargo install mcl-launcher
\`\`\`
## Homebrew
\`\`\`
brew install objz/tap/mcl-launcher
\`\`\`
## WinGet
\`\`\`
winget install Objz.MclLauncher
\`\`\`
## Chocolatey
\`\`\`
choco install mcl-launcher
\`\`\`
## AUR
\`\`\`
paru -S mcl-launcher-bin
\`\`\`
EOF
@@ -331,15 +351,15 @@ jobs:
steps:
- name: Verify Homebrew tap access
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
if [ -z "${GH_TOKEN}" ]; then
echo "::error::RELEASE_TOKEN is required to publish Homebrew formulae to ${HOMEBREW_TAP_REPOSITORY}."
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::RELEASE_TOKEN cannot access ${HOMEBREW_TAP_REPOSITORY}. Create the tap repository or update RELEASE_TOKEN with access to it."
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
@@ -347,7 +367,7 @@ jobs:
with:
persist-credentials: true
repository: ${{ env.HOMEBREW_TAP_REPOSITORY }}
token: ${{ secrets.RELEASE_TOKEN }}
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
# So we have access to the formula
- name: Fetch homebrew formulae
uses: actions/download-artifact@v7