Repository navigation
feat: add Setup CommerceKit CLI GitHub Action - #1
Merged
Merged
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Adds the public Setup CommerceKit CLI JavaScript Action. The Action installs and verifies an exact CommerceKit CLI version or the latest stable CLI release. It does not run project checks or inspect a consumer's repository.
Action contract
versionis optional.latestor an exact semantic version; other aliases, ranges, tags, URLs, and Git refs are rejected.versionand supplyingversion: latestboth resolve GitHub's latest non-prerelease CommerceKit CLI release, verify its discovery metadata, validate a stable semantic version, and install from the immutablecli-v<resolved-version>tag.0.1.0-preview.2and newer compatible releases. Preview releases require an explicit exact version.latestcurrently fail clearly instead of selecting a preview.release-manifest.jsonagainstSHA256SUMS, validates schema 1 at runtime, cross-checks target metadata and hashes, and verifies the archive SHA-256 before extraction.--version, places it in the runner tool cache, re-verifies cache hits, and adds its directory toPATH.version,path,target,build-id, andcache-hitoutputs.Latest-stable trust flow
The mutable GitHub
releases/latest/downloadpath is used only to discover a non-prerelease version. Its manifest is checksum-verified and validated before use. The Action then downloads and verifies metadata again from that version's exactcli-v<version>tag and downloads the archive only from the exact tag. Prerelease metadata is rejected by the stable resolver.Security and privacy
commercekit-tools/cliGitHub release URLs.SHA-256 checks validate downloaded bytes against the release's published integrity metadata; they are not publisher identity or code-signing verification.
Tests and release integration
latestselector, exact version validation, stable resolution, prerelease rejection, the six platform mappings, checksum parsing, manifest validation, release resolution, cache behavior, installation failures, safe errors, orchestration, and binary verification.0.1.0-preview.2, executed the exact installeddarwin-arm64binary, validated help output, and confirmed a verified same-job cache hit.latestprobes confirm the current no-stable-release state fails safely with no success outputs.dist/index.jsis committed and reproducibly generated with@vercel/ncc.pnpm quality, the full dependency audit, and real public-release integration pass locally on Node 24.21.0 / pnpm 12.6.0.Public repository readiness
v1) and CLI version selection policy.Deferred by design
CommerceKit command execution, notifications, Slack, Teams, email, reusable workflows, CCv2 build/deploy, SAP credentials/API logic, Homebrew, WinGet, Action tags/releases, and Marketplace publication are outside this PR.
Checklist
latestexplicitly selects the latest stable releaselatestor version range accepted