feat: support nightly release and Windows MSI installer#137
Open
roger-zhangg wants to merge 5 commits into
Open
feat: support nightly release and Windows MSI installer#137roger-zhangg wants to merge 5 commits into
roger-zhangg wants to merge 5 commits into
Conversation
Adds two new capabilities to the native installer path:
- "version: nightly" downloads from the sam-cli-nightly tag. The tag
mutates daily, so caching is intentionally skipped. The Linux archive
ships sam-nightly instead of sam, so a sam symlink is created.
- Windows runners are now supported via the official AWS_SAM_CLI_64_PY3.msi.
Installs run msiexec silently, treat exit 3010 (reboot required) as
success, and resolve the install dir from %ProgramFiles%. For nightly
on Windows, sam-nightly.{cmd,exe} is copied to sam.{cmd,exe} so users
can call sam consistently across releases.
README also documents that SAM CLI is preinstalled on every GitHub-hosted
runner image, so users only need this action when they need a specific
version, the nightly release, or a self-hosted runner.
Closes aws-actions#129
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tc.downloadTool writes to a UUID-named file by default, which Windows Installer rejected with exit code 1603 because msiexec dispatches by file extension. Pass an explicit destination ending in .msi so the installer recognizes the file format. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Windows MSI install was failing with exit code 1603 because the runner image preinstalls SAM CLI 1.158.0 and Windows Installer rejects silent downgrades. Bumping the pinned version to 1.159.1 (newer than the preinstalled version) resolves the install conflict and uses a more recent stable release across Linux and PyPI matrix tests too. The PyPI matrix still pins SAM_VERSION=1.18.2 for older Python versions (3.10, 3.11) since that combination intentionally tests legacy support. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reedham-aws
reviewed
May 8, 2026
GitHub-hosted Windows runners ship a recent SAM CLI preinstalled, and Windows Installer rejects silent downgrades — `msiexec /i` for an older or equal-version MSI fails with exit 1603. Bumping the test pin past the preinstalled version (the previous workaround) only papers over the issue: the same failure recurs every time the runner image is updated. Add an `uninstallExistingWindowsSamCli` step that runs before every Windows install (pinned, latest, nightly). It enumerates the Windows uninstall registry for products whose `InstallLocation` matches the target install root for the flavor (stable vs nightly) and runs `msiexec /x` for each match. Best-effort: warns and continues on failure, letting the subsequent install surface the real error. Restore the pinned-version Windows MSI test to 1.139.0 so it actually exercises the downgrade path against the runner's preinstalled version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tion The previous uninstall-before-install step filtered registry entries by `InstallLocation -ieq <install root>`, but the AWS SAM CLI MSI does not populate `ARPINSTALLLOCATION`, so that field is empty in the uninstall registry — the filter matched zero entries and the subsequent `msiexec /i` still hit exit 1603 (downgrade rejected). Match by `DisplayName -like 'AWS SAM Command Line Interface*'` instead, which the install log confirms is reliably set. Stable and nightly are distinguished by whether the DisplayName contains "Nightly" so the two products remain isolated. Also log a "no matching entry found" line so future failures of this kind are easier to diagnose from the action output. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
version: nightlysupport to install the latest SAM CLI nightly release. Skips caching (the tag mutates daily) and aliasessam-nightly→samso existing workflow commands keep working.use-installer: true. RunsAWS_SAM_CLI_64_PY3.msisilently, treats exit 3010 (reboot required) as success, and resolves the install dir under%ProgramFiles%\Amazon\AWSSAMCLI[_NIGHTLY]\bin.Closes #129.
Implementation notes
installUsingNativeInstalleris now a thin dispatch overinstallLinuxNativeInstaller(existing logic, refactored out) and the newinstallWindowsNativeInstaller. macOS still rejects, with a clearer error message.Program Filesand the registry, and the existingactions/cachetar-based flow doesn't fit. This matches the behavior of aws-sam-cli's own install script.sam-nightly.{cmd,exe}is copied tosam.{cmd,exe}(rather than symlinked) since Windows symlinks need elevation. On Linux nightly we use a symlink.Test plan
node:24-bullseyeDocker container):version: nightlydownloadsaws-sam-cli-linux-arm64.zipfromsam-cli-nightly, extracts, symlinkssam → sam-nightly, andsam --versionreturnsSAM CLI, version 1.159.1.dev202605080901.native-installermatrix already covers Ubuntu pinned/cache/latest. Added a nightly step. Newnative-installer-windowsmatrix coverswindows-latestandwindows-2022with pinned/latest/nightly steps.🤖 Generated with Claude Code