Skip to content

chore(ENG-13952): add dev-release workflow for standalone binaries - #357

Open
cloudsmith-iduffy wants to merge 3 commits into
masterfrom
eng-13952-dev-release-workflow
Open

chore(ENG-13952): add dev-release workflow for standalone binaries#357
cloudsmith-iduffy wants to merge 3 commits into
masterfrom
eng-13952-dev-release-workflow

Conversation

@cloudsmith-iduffy

@cloudsmith-iduffycloudsmith-iduffy commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What

Add a manually dispatched Dev Release workflow (ENG-13952). It builds the standalone binaries for the selected branch with the reusable binaries.yml workflow. It publishes them to the Cloudsmith repository set in the CLOUDSMITH_DEV_REPO repository variable.

How it works

  • Only users with write access can dispatch the workflow.
  • Packages keep the name cloudsmith-cli-<target>. Each build gets the version <base>-dev.<run_number>.g<short_sha> and the tags dev-build and branch-<name>.
  • The dev version applies to the Cloudsmith package only. The binary itself reports the base version from cloudsmith_cli/data/VERSION. A build-time version override would change the reusable binaries.yml workflow and break its version smoketests, so it is out of scope here.
  • The publish loop reads the target list from .github/scripts/binaries-matrix.json, the same source as the build matrix.
  • The workflow verifies the SHA256 checksum of each archive before the upload.
  • Authentication uses the same OIDC service account as the release workflow.
  • The job summary lists the download URL and the SHA256 for each target.

Setup before the first run

  • Create the dev repository in Cloudsmith: public, republish enabled, ~30-day retention.
  • Set the CLOUDSMITH_DEV_REPO repository variable (done).
  • Confirm the OIDC policy accepts ref: refs/heads/<branch> claims from this workflow.

Example run of this workflow can be seen at https://github.com/cloudsmith-io/cloudsmith-cli/actions/runs/31969009330?pr=357

Add a manually dispatched workflow. It builds the standalone binaries
for a branch with the reusable binaries workflow. It publishes them to
the Cloudsmith repository in the CLOUDSMITH_DEV_REPO variable for
manual tests. The job summary lists the download URL and SHA256 for
each target.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudsmith-iduffy
cloudsmith-iduffy requested a review from a team as a code ownerAugust 16, 2026 19:53
CopilotAI lite review requested due to automatic review settings August 16, 2026 19:53
Revert this commit after the test run passes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a manually-dispatched GitHub Actions workflow to publish “dev” builds of the standalone CLI binaries to a dedicated Cloudsmith repository, reusing the existing binaries.yml build workflow and OIDC auth approach.

Changes:

  • Introduces a Dev Releaseworkflow_dispatch workflow that builds standalone binaries via the reusable binaries.yml.
  • Publishes artifacts to the Cloudsmith dev repo using a derived -dev.<run_number>.g<short_sha> Cloudsmith package version and dev-build/branch-<name> tags.
  • Writes a job summary containing per-target download URLs and SHA256 values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread.github/workflows/dev-release.yml Outdated
BRANCH_TAG=$(printf '%s' "${BRANCH}" | sed 's/[^A-Za-z0-9._-]/-/g' | cut -c1-64)
SUMMARY_ROWS=""

for TARGET in ${BINARY_TARGETS}; do

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed in 72a88cf. The publish loop now reads the targets and archive extensions from .github/scripts/binaries-matrix.json.

Comment on lines +83 to +86
ARCHIVE="binaries/cloudsmith-${BASE_VERSION}-${TARGET}${EXT}"
test -f "${ARCHIVE}"
test -f "${ARCHIVE}.sha256"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed in 72a88cf. The workflow now runs sha256sum -c on each archive before the upload.

Comment on lines +48 to +50
BASE=$(cat cloudsmith_cli/data/VERSION)
echo "base=${BASE}" >> "$GITHUB_OUTPUT"
echo "dev=${BASE}-dev.${GITHUB_RUN_NUMBER}.g${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

The dev version applies to the Cloudsmith package only; the binary reports the base version. A build-time override would change the reusable binaries.yml workflow and break its version smoketests, so it is out of scope here. The PR description now states this.

Read the target list from binaries-matrix.json so the publish loop
cannot drift from the build matrix. Verify each SHA256 checksum
before the upload.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto 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.

2 participants

@cloudsmith-iduffy