Skip to content

feat: publish install scripts to Cloudsmith on release#11

Merged
BartoszBlizniak merged 4 commits into
mainfrom
feat/publish-scripts-to-cloudsmith
Jul 22, 2026
Merged

feat: publish install scripts to Cloudsmith on release#11
BartoszBlizniak merged 4 commits into
mainfrom
feat/publish-scripts-to-cloudsmith

Conversation

@BartoszBlizniak

Copy link
Copy Markdown
Member

Summary

  • Adds a publish-cloudsmith job to .github/workflows/release.yml that runs after the release job on the same tag trigger.
  • Gated on vars.CLOUDSMITH_SERVICE_SLUG != '' so existing tag runs stay green until the Cloudsmith side is configured (mirrors the vendor job's vars.ENABLE_VENDORING gate).
  • Installs the Cloudsmith CLI by running this repo's own install.sh --version latest (dogfooding) and parses the executable= line from its output without eval.
  • Authenticates via the CLI's native GitHub Actions OIDC exchange (id-token: write, CLOUDSMITH_ORG/CLOUDSMITH_SERVICE_SLUG env) — no API key needed.
  • Pushes install.sh, install.ps1, and a freshly generated SHA256SUMS as raw packages to ${{ vars.CLOUDSMITH_NAMESPACE }}/${{ vars.CLOUDSMITH_REPO }}, tagged with the release version, using --republish so re-running a tag is idempotent.
  • Verifies each pushed file by downloading it from the public dl.cloudsmith.io URL and comparing checksums; a failed download (e.g. repo still private) prints a notice and is skipped rather than failing the job, but a checksum mismatch on a successful download still fails.
  • Adds an "Install from Cloudsmith" subsection to the README documenting the stable download URLs (defaulting to latest) for both install.sh and install.ps1, plus SHA256SUMS. Existing GitHub-releases instructions are unchanged.
  • Adds a CHANGELOG entry under [Unreleased].

Required configuration before merging

  • Set repository variable CLOUDSMITH_NAMESPACE=cloudsmith
  • Set repository variable CLOUDSMITH_REPO=cloudsmith-cli-install-script
  • Set repository variable CLOUDSMITH_SERVICE_SLUG=cli-install-script-publisher
  • Configure the Cloudsmith OIDC provider mapping: GitHub Actions issuer, claim repo:cloudsmith-io/cloudsmith-cli-install-script:* → service account cli-install-script-publisher
  • Make the cloudsmith/cloudsmith-cli-install-script Cloudsmith repository public before the dl.cloudsmith.io public download URLs in the README will work

Validation

  • sh -n install.sh and shellcheck --shell=sh --severity=style install.sh (unchanged, still clean)
  • bats tests/install.bats — 39/39 passing
  • shellcheck --shell=bash --severity=style against each new workflow run: block — clean
  • zizmor --pedantic .github/workflows/release.yml — no findings

Compatibility

None. No change to the installer scripts, their options, environment variables, installation paths, or the four-line output contract.

Checklist

  • I have added or updated tests where appropriate. (No installer behavior changed; existing bats suite still passes.)
  • I have updated documentation and CHANGELOG.md where appropriate.
  • I have not included credentials, tokens, or other sensitive data.
  • I have called out any breaking change explicitly. (None.)

Adds a publish-cloudsmith job to the release workflow that dogfoods
install.sh to fetch the Cloudsmith CLI, authenticates via the CLI's
native GitHub Actions OIDC exchange, and pushes install.sh, install.ps1,
and SHA256SUMS as raw packages. Gated on vars.CLOUDSMITH_SERVICE_SLUG so
existing tag runs stay green until the Cloudsmith side is configured.
Documents the resulting stable download URLs in the README.
@wiz-bf9f52b9c0

wiz-bf9f52b9c0 Bot commented Jul 21, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Comment thread .github/workflows/release.yml
BartoszBlizniak and others added 3 commits July 21, 2026 16:16
The Cloudsmith packages are named cli.sh and cli.ps1 so they are served
at https://install.cloudsmith.com/cli.<sh|ps1> once the custom domain is
live. SHA256SUMS covers the published names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BartoszBlizniak
BartoszBlizniak marked this pull request as ready for review July 21, 2026 16:26
@BartoszBlizniak
BartoszBlizniak requested a review from a team as a code owner July 21, 2026 16:26
Copilot AI review requested due to automatic review settings July 21, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Publishes this repository’s installer artifacts to Cloudsmith on tagged releases, so users can install via stable Cloudsmith “short URLs” while keeping existing GitHub Releases instructions intact.

Changes:

  • Adds a publish-cloudsmith job to the release workflow to push cli.sh, cli.ps1, and SHA256SUMS as Cloudsmith raw packages using GitHub Actions OIDC.
  • Documents Cloudsmith install/download URLs in README.md.
  • Records the new publishing behavior in CHANGELOG.md under [Unreleased].

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release.yml Adds a gated Cloudsmith publish+verify job to the release workflow.
README.md Adds “Install from Cloudsmith” instructions and stable URL patterns.
CHANGELOG.md Notes the new Cloudsmith publishing workflow and README update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@BartoszBlizniak
BartoszBlizniak merged commit 5792f35 into main Jul 22, 2026
13 checks passed
@BartoszBlizniak
BartoszBlizniak deleted the feat/publish-scripts-to-cloudsmith branch July 22, 2026 14:17
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.

3 participants