Skip to content

feat: install mergify-cli from prebuilt release binary#2

Open
sileht wants to merge 1 commit into
mainfrom
devs/sileht/mrgfy-7660-setup-cli-prebuilt-binaries/install-mergify-cli-prebuilt-release-binaries--f70ad03d
Open

feat: install mergify-cli from prebuilt release binary#2
sileht wants to merge 1 commit into
mainfrom
devs/sileht/mrgfy-7660-setup-cli-prebuilt-binaries/install-mergify-cli-prebuilt-release-binaries--f70ad03d

Conversation

@sileht

@sileht sileht commented Jun 17, 2026

Copy link
Copy Markdown
Member

Replace the Python + uv install path (uv tool install mergify-cli) with the
mergify-cli prebuilt binary, installed via the CLI's own install.sh installer.

Why delegate to install.sh rather than re-implement the download/verify:

  • install.sh owns platform detection, asset naming, and SHA256SUMS
    verification, so the action doesn't duplicate that logic or have to track it
    when the asset naming changes (it already changed once between releases).
  • For a pinned version we fetch install.sh from that release tag (its asset
    naming matches the binary it installs); for latest/empty we fetch it from
    main and let the installer resolve the latest release.

Details:

  • Fetch install.sh (tag or main), run it with MERGIFY_VERSION +
    MERGIFY_INSTALL_DIR, add the dir to $GITHUB_PATH.
  • The mergify_cli_version output is read back from mergify --version (the
    binary reports its real version), accurate for both pinned and latest.
  • Default bumped to 2026.6.16.1, the first release with prebuilt binaries +
    install.sh under the canonical versioned asset naming.
  • Renovate datasource moved pypi -> github-releases (Mergifyio/mergify-cli,
    pep440).
  • CI test-install is a matrix over the target triples install.sh supports
    (linux/macos, x86_64 + aarch64).

install.sh currently supports Linux and macOS only; Windows is picked up
automatically once install.sh ships a Windows path.

BREAKING CHANGE: the python_version input is removed (no Python is used) and
the action no longer provisions Python/uv on PATH as a side effect.

Fixes MRGFY-7660

Comment thread action.yml
@sileht sileht changed the title feat: install mergify-cli from prebuilt release binaries feat: install mergify-cli from prebuilt release binary Jun 17, 2026
@sileht sileht force-pushed the devs/sileht/mrgfy-7660-setup-cli-prebuilt-binaries/install-mergify-cli-prebuilt-release-binaries--f70ad03d branch from f4d8ea7 to 0b2f151 Compare June 17, 2026 20:55
@sileht

sileht commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial f4d8ea7 2026-06-17 20:55 UTC
2 content f4d8ea7 → 0b2f151 (raw) 2026-06-17 20:55 UTC
3 content 0b2f151 → 4a66dc7 (raw) 2026-06-17 21:08 UTC

Comment thread action.yml Outdated
if [ -z "${MERGIFY_CLI_VERSION}" ] || [ "${MERGIFY_CLI_VERSION}" = "latest" ]; then
effective=$(curl -fsSL -o /dev/null -w '%{url_effective}' "https://github.com/${REPO}/releases/latest") \
|| die "could not reach github.com to resolve the latest mergify-cli release"
version=${effective##*/tag/}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pick main for latest

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Dropped the redirect resolution: for latest/empty the action now fetches install.sh from main and lets it resolve+install the latest release; for a pinned version it still fetches install.sh from that release tag. MERGIFY_VERSION just forwards the input.

Replace the Python + uv install path (`uv tool install mergify-cli`) with the
mergify-cli prebuilt binary, installed via the CLI's own `install.sh` installer.

Why delegate to install.sh rather than re-implement the download/verify:
- install.sh owns platform detection, asset naming, and SHA256SUMS
  verification, so the action doesn't duplicate that logic or have to track it
  when the asset naming changes (it already changed once between releases).
- For a pinned version we fetch install.sh from that release tag (its asset
  naming matches the binary it installs); for `latest`/empty we fetch it from
  `main` and let the installer resolve the latest release.

Details:
- Fetch install.sh (tag or main), run it with MERGIFY_VERSION +
  MERGIFY_INSTALL_DIR, add the dir to $GITHUB_PATH.
- The `mergify_cli_version` output is read back from `mergify --version` (the
  binary reports its real version), accurate for both pinned and `latest`.
- Default bumped to 2026.6.16.1, the first release with prebuilt binaries +
  install.sh under the canonical versioned asset naming.
- Renovate datasource moved pypi -> github-releases (Mergifyio/mergify-cli,
  pep440).
- CI test-install is a matrix over the target triples install.sh supports
  (linux/macos, x86_64 + aarch64).

install.sh currently supports Linux and macOS only; Windows is picked up
automatically once install.sh ships a Windows path.

BREAKING CHANGE: the `python_version` input is removed (no Python is used) and
the action no longer provisions Python/uv on PATH as a side effect.

Fixes MRGFY-7660
Change-Id: If70ad03ddf01ec196f051fef6489b68904d02b20
@sileht sileht force-pushed the devs/sileht/mrgfy-7660-setup-cli-prebuilt-binaries/install-mergify-cli-prebuilt-release-binaries--f70ad03d branch from 0b2f151 to 4a66dc7 Compare June 17, 2026 21:08
@sileht sileht marked this pull request as ready for review June 18, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant