A GitHub Action that installs the Smithy CLI onto your
Actions runner. It works on Linux, macOS, and Windows, caches the CLI binary
to avoid redundant downloads, and automatically caches Maven dependencies
when your smithy-build.json declares them.
Add the action to any workflow step. The simplest form installs the latest release:
steps:
- uses: actions/checkout@v4
- uses: smithy-lang/setup-smithy-cli@v1
- run: smithy buildTo pin a specific version:
steps:
- uses: actions/checkout@v4
- uses: smithy-lang/setup-smithy-cli@v1
with:
version: '1.56.0'
- run: smithy buildIf your smithy-build.json lives somewhere other than the repository root,
point the action at it so Maven dependency caching works correctly:
steps:
- uses: actions/checkout@v4
- uses: smithy-lang/setup-smithy-cli@v1
with:
config: path/to/smithy-build.json
- run: smithy buildThe installed version is available as an output for downstream steps:
steps:
- uses: actions/checkout@v4
- id: smithy
uses: smithy-lang/setup-smithy-cli@v1
- run: echo "Installed ${{ steps.smithy.outputs.cli-version }}"| Name | Required | Default | Description |
|---|---|---|---|
version |
No | Latest release | Smithy CLI version to install. A leading v prefix is stripped automatically. |
config |
No | smithy-build.json |
Path to smithy-build.json used for Maven dependency caching. |
| Name | Description |
|---|---|
cli-version |
The resolved version string that was installed. |
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.