Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ concurrency:
jobs:
quality:
name: Quality and committed bundle
permissions:
contents: read
packages: read
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
Expand All @@ -26,12 +29,16 @@ jobs:
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .node-version
registry-url: https://npm.pkg.github.com
scope: '@commercekit-tools'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run quality gate
run: pnpm quality
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@commercekit-tools:registry=https://npm.pkg.github.com
19 changes: 15 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ Thank you for helping improve Setup CommerceKit CLI.
- Git

The repository pins pnpm in `package.json`; do not install or publish this
package through npm.
package through npm. Development installation also reads the existing shared
notification contract from GitHub Packages. Configure package-read
authentication in user-level npm configuration; the repository scope
configuration contains no credentials. Trusted CI installation grants
`packages: read` only to its quality job. Fork workflows may lack package
access; do not use privileged untrusted PR execution to bypass that restriction.

Normal reporting development uses exact published notification-contract 0.0.6.
No source checkout, candidate preparation or file:tarball dependency is needed.
The historical candidate procedure is archived in
`docs/reporting-validation.md`.

```bash
corepack enable
Expand Down Expand Up @@ -45,9 +55,10 @@ pnpm test:integration
```

It verifies release metadata, the selected archive, executable version, Action
outputs, and a second-invocation cache hit. It does not install into a system
directory or modify a shell profile. Latest-stable discovery is covered with
synthetic unit fixtures because the current public CLI releases are previews.
outputs, validated notification contexts, success/failure summaries and a
second-invocation cache hit. It does not install into a system directory or
modify a shell profile. Latest-stable discovery is covered with synthetic unit
fixtures because the current public CLI releases are previews.

## Committed bundle

Expand Down
64 changes: 55 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setup CommerceKit CLI

> **Registry-backed reporting:** consistent notifications and GitHub summaries
> consume exact published notification-contract 0.0.6 and are bundled for
> runtime consumers. See [reporting validation](docs/reporting-validation.md).

Install and verify a requested
[CommerceKit CLI](https://github.com/commercekit-tools/cli) version, or the
latest stable version, on a GitHub Actions runner.
Expand Down Expand Up @@ -104,16 +108,18 @@ fails. It never falls back to another release, Homebrew, or WinGet.

## Outputs

| Output | Meaning | Example |
| ----------- | -------------------------------------------------- | ---------------------------------------------- |
| `version` | Exact installed CLI version. | `0.1.0-preview.2` |
| `path` | Absolute path to the verified executable. | Runner tool-cache path ending in `commercekit` |
| `target` | Normalized release target selected for the runner. | `linux-x64` |
| `build-id` | Verified identity from `release-manifest.json`. | 40-character source identity |
| `cache-hit` | Lowercase string for verified tool-cache reuse. | `true` |
| Output | Meaning | Example |
| -------------------- | --------------------------------------------------- | ---------------------------------------------- |
| `version` | Exact installed CLI version. | `0.1.0-preview.2` |
| `path` | Absolute path to the verified executable. | Runner tool-cache path ending in `commercekit` |
| `target` | Normalized release target selected for the runner. | `linux-x64` |
| `build-id` | Verified identity from `release-manifest.json`. | 40-character source identity |
| `cache-hit` | Lowercase string for verified tool-cache reuse. | `true` |
| `notification-event` | Validated setup event with safe inputs and outcome. | Bounded JSON for the existing Notify action. |

Outputs are set only after the executable passes integrity and exact-version
verification.
Installation outputs are set only after the executable passes integrity and
exact-version verification. The Action also emits `notification-event` for
handled failures before the Action reports failure.

```yaml
- name: Show resolved installation
Expand All @@ -125,6 +131,46 @@ verification.
"$COMMERCEKIT_PATH" --version
```

## Consistent notifications and job summaries

The Action uses the existing shared notification contract and the existing
Notify Action. It does not add a webhook input or delivery code.
`commercekit.setup.completed` reports setup success or failure with the exact
`version` input name, effective `latest` when omitted, validation/truncation
metadata, verified installed version, target, build identity, cache reuse and
duration when available. Failures include a safe code and explanation. A cache
hit remains successful; the Action does not invent a warning condition.

Every handled success or failure writes the shared GitHub summary layout: status
icon and label, result table, input table, validation/truncation state and safe
error detail. This includes invalid version, stable-release discovery, download,
checksum and executable-verification failures. The shared visual vocabulary uses
✅ success, ❌ failure and ⚠️ warnings where applicable. Raw exceptions, URL
credentials/query strings, known secret/token patterns and absolute executable
paths are not included in summaries or notifications. Reporting errors produce a
fixed safe warning while preserving installation outputs and the original
success/failure outcome.

Use compatible reviewed immutable Setup and Notify commits. Replace both
placeholders below after reviewing their registry-backed validation:

```yaml
- uses: commercekit-tools/setup-commercekit@REPLACE_WITH_REVIEWED_SETUP_COMMIT
id: setup
with:
version: '0.1.0-preview.2'
- uses: commercekit-tools/notify@REPLACE_WITH_COMPATIBLE_NOTIFY_COMMIT
if: ${{ always() && steps.setup.outputs.notification-event != '' }}
with:
provider: slack # or teams-workflow
event-json: ${{ steps.setup.outputs.notification-event }}
webhook-url: ${{ secrets.COMMERCEKIT_NOTIFICATION_WEBHOOK }}
fail-on-notification-error: 'false'
```

Older Notify versions reject the new setup event. Webhook credentials belong
only on Notify; notification delivery does not replace the setup step's outcome.

## Supported targets

The published CommerceKit CLI provides these standalone targets:
Expand Down
11 changes: 11 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ This repository does not publish an npm package.
major version.
- CLI preview maturity does not change the Action's interface version.

## Reporting consistency

The Action consumes exact published notification-contract 0.0.6, with its
registry lockfile and standalone bundle committed. Normal development and
runtime use no candidate dependency or source checkout. The package-only
publication is separate from this Action's release process; it created no Action
tag or Marketplace release. See
[reporting-validation.md](docs/reporting-validation.md) for exact provenance and
normal validation evidence. All quality/security checks and six native runner
jobs must pass on the reviewed release commit.

## Release prerequisites

Before creating a release:
Expand Down
15 changes: 10 additions & 5 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ dependencies is committed as `dist/licenses.txt`.

Direct runtime dependencies include:

| Dependency | License | Project |
| --------------------- | ------- | ------------------------------------ |
| `@actions/core` | MIT | <https://github.com/actions/toolkit> |
| `@actions/tool-cache` | MIT | <https://github.com/actions/toolkit> |
| `semver` | ISC | <https://github.com/npm/node-semver> |
| Dependency | License | Project |
| ------------------------------------------ | ------- | ------------------------------------------------- |
| `@actions/core` | MIT | <https://github.com/actions/toolkit> |
| `@actions/tool-cache` | MIT | <https://github.com/actions/toolkit> |
| `semver` | ISC | <https://github.com/npm/node-semver> |
| `@commercekit-tools/notification-contract` | MIT | <https://github.com/commercekit-tools/action-kit> |

These notices do not replace the license terms shipped in the generated bundle
or the dependencies' source distributions.

The reporting implementation consumes the exact published shared contract and
its runtime dependencies. The regenerated `dist/licenses.txt` accompanies the
standalone registry-backed bundle; runtime consumers install no packages.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
required: false

outputs:
notification-event:
description:
Validated setup notification event with safe input context and outcome.
version:
description: Exact installed CommerceKit CLI version.
path:
Expand Down
12 changes: 9 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

159 changes: 159 additions & 0 deletions dist/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,165 @@ The above copyright notice and this permission notice shall be included in all c

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@commercekit-tools/notification-contract
MIT
MIT License

Copyright (c) 2026 CommerceKit contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


ajv
MIT
The MIT License (MIT)

Copyright (c) 2015-2021 Evgeny Poberezkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



ajv-formats
MIT
MIT License

Copyright (c) 2020 Evgeny Poberezkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


fast-deep-equal
MIT
MIT License

Copyright (c) 2017 Evgeny Poberezkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


fast-uri
BSD-3-Clause
Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* * *

The complete list of contributors can be found at:
- https://github.com/garycourt/uri-js/graphs/contributors

json-schema-traverse
MIT
MIT License

Copyright (c) 2017 Evgeny Poberezkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


semver
ISC
The ISC License
Expand Down
Loading
Loading