ci: fixed chocolatey workflow and hombrew
This commit is contained in:
1 parent
3d8b3deb74
commit
495a4b3fa1
2 files changed
+43
-9
No files matched your search
@@ -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
|
args: pack ${{ steps.package.outputs.package_dir }}/mcl-launcher.nuspec --version ${{ steps.package.outputs.version }} --output-directory target/chocolatey/out
|
||||||
|
|
||||||
- name: push Chocolatey package
|
- name: push Chocolatey package
|
||||||
uses: crazy-max/ghaction-chocolatey@v4
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
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
|
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
|
||||||
@@ -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-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) |
|
| [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
|
cargo install mcl-launcher
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## Homebrew
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
brew install objz/tap/mcl-launcher
|
brew install objz/tap/mcl-launcher
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## WinGet
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
winget install Objz.MclLauncher
|
winget install Objz.MclLauncher
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## Chocolatey
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
choco install mcl-launcher
|
choco install mcl-launcher
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## AUR
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
paru -S mcl-launcher-bin
|
paru -S mcl-launcher-bin
|
||||||
\`\`\`
|
\`\`\`
|
||||||
EOF
|
EOF
|
||||||
@@ -331,15 +351,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Verify Homebrew tap access
|
- name: Verify Homebrew tap access
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${GH_TOKEN}" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! gh repo view "${HOMEBREW_TAP_REPOSITORY}" >/dev/null; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -347,7 +367,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
repository: ${{ env.HOMEBREW_TAP_REPOSITORY }}
|
repository: ${{ env.HOMEBREW_TAP_REPOSITORY }}
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||||
# So we have access to the formula
|
# So we have access to the formula
|
||||||
- name: Fetch homebrew formulae
|
- name: Fetch homebrew formulae
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v7
|
||||||
|
|||||||
Reference in new issue
Block a user