Skip to content

feat(release): align snapshot releases with CLI Next - #1521

Merged
joelmccoy merged 14 commits into
mainfrom
sebastianlaskawiec/cli-265
Sep 8, 2026
Merged

joelmccoy merged 14 commits into
mainfrom
sebastianlaskawiec/cli-265

Conversation

@slaskawi

@slaskawi slaskawi commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Implements CLI-265 with unique snapshot releases built and tested only from main.

How it works

  1. Scheduled and manual runs check out and test main.
  2. The workflow derives the latest stable semantic version and generates v<version>-snapshot+<UTC timestamp>-<8-char SHA>.
  3. Release tests complete before the tag is pushed.
  4. The generated tag is pushed and published with the snapshot release configuration.
  5. Snapshot releases publish prerelease binaries, DEB/RPM packages, checksums, and SBOMs without updating Homebrew or latest.
  6. Publication verifies the Linux amd64 checksum and both CLI modes report the generated tag.
  7. Scheduled cleanup retains the three newest snapshot releases and tags.

Safety boundaries

  • Snapshot releases always build reviewed main; arbitrary branches and SHAs cannot reach release-test write permissions.
  • Stable publishing skips -snapshot+ tags.
  • Duplicate generated tags fail before publication.
  • Test failure prevents tag creation and publication.

Related Issue

Relates to CLI-265

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Validation

  • YAML parsing passed for changed workflows and GoReleaser configurations.
  • .goreleaser.snapshot.yaml passed mise exec -- goreleaser check --config .goreleaser.snapshot.yaml.
  • .goreleaser.yaml retains a pre-existing deprecated brews property, so its GoReleaser check exits non-zero.
  • git diff --check passed.
  • PR CI is running.

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi
slaskawi requested a review from a team as a code owner August 27, 2026 06:52
Copilot AI lite review requested due to automatic review settings August 27, 2026 06:52
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the mutable nightly release with immutable nightly and ad-hoc releases and consolidates stable and unstable publishing into a reusable workflow.

  • Adds branch/SHA preparation, release testing, immutable tagging, publishing, and retention of the three latest nightlies.
  • Adds an unstable GoReleaser configuration for binaries, Linux packages, checksums, and SBOMs.
  • Extends reusable tests to check out the selected source commit and verifies downloaded release binaries in Legacy and Next modes.

Confidence Score: 3/5

The PR is not yet safe to merge because valid ad-hoc inputs can leave unpublished tags and artifact verification can execute the wrong architecture.

The new release path pushes its immutable tag before discovering that a historical source ref lacks the unstable release configuration, while the publisher downloads both Linux architectures and selects one without pinning amd64.

Files Needing Attention: .github/workflows/nightly-release.yaml, .github/workflows/release-publish.yaml

Important Files Changed

Filename Overview
.github/workflows/nightly-release.yaml Adds immutable nightly/ad-hoc orchestration, but accepts historical refs that can leave an orphaned tag when required publishing files are absent.
.github/workflows/release-publish.yaml Centralizes release publishing and artifact checks, but the Linux amd64 verification can select the arm64 executable.
.github/workflows/release.yaml Delegates stable-tag publishing to the new reusable workflow while excluding unstable tags.
.github/workflows/test-release.yaml Propagates an optional source ref into canonical release tests.
.github/workflows/test.yaml Consistently checks out the supplied source ref across reusable test jobs.
.goreleaser.unstable.yaml Defines immutable unstable binaries, packages, checksums, SBOMs, and prerelease metadata; its dual Linux architectures expose ambiguity in the verifier.
tasks/todo.md Records release-path implementation and remaining validation work.

Sequence Diagram

sequenceDiagram
    actor User as Schedule or Maintainer
    participant Prepare as Prepare job
    participant Tests as Release tests
    participant Git as GitHub tags
    participant Publish as Shared publisher
    participant Release as GitHub release
    User->>Prepare: Select main, branch, or SHA
    Prepare->>Prepare: Resolve SHA and immutable tag
    Prepare->>Tests: Test source SHA
    Tests-->>Prepare: Tests pass
    Prepare->>Git: Push immutable tag
    Git->>Publish: Checkout tag
    Publish->>Release: Build and publish artifacts
    Publish->>Release: Download and verify Linux binary
Loading

Reviews (1): Last reviewed commit: "feat(release): align unstable releases w..." | Re-trigger Greptile

Comment thread .github/workflows/unstable-release.yaml Resolved
Comment thread .github/workflows/release-publish.yaml Resolved

Copilot AI 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

Aligns UDS CLI’s unstable (nightly/ad-hoc) release process with the CLI Next immutable tag model by introducing immutable unstable tag naming, reusing a shared publish workflow, and enabling release-path testing/publishing against arbitrary refs.

Changes:

  • Adds an unstable GoReleaser config and a shared release-publish reusable workflow for stable/unstable publishing.
  • Updates canonical/release test workflows to optionally checkout and test an explicit ref (branch/SHA).
  • Refactors the nightly workflow into a multi-job pipeline that prepares tags, runs release tests on the source SHA, publishes, and prunes old nightlies.

Reviewed changes

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

Show a summary per file
File Description
tasks/todo.md Tracks remaining follow-up tasks for the release-path changes.
.goreleaser.unstable.yaml New GoReleaser config for unstable prerelease publishing with immutable tags and SBOMs.
.github/workflows/test.yaml Adds ref input to allow reusable test workflow to run against a specified ref.
.github/workflows/test-release.yaml Passes an optional ref through to canonical tests for release validation.
.github/workflows/release.yaml Skips stable release jobs for unstable tag patterns and delegates publishing to the shared workflow.
.github/workflows/release-publish.yaml New reusable workflow to publish releases via GoReleaser and verify published artifacts.
.github/workflows/nightly-release.yaml Reworks nightly into β€œunstable release” pipeline: prepare/tag/test/publish + nightly retention cleanup.

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

Comment thread .github/workflows/release-publish.yaml Resolved
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60fd20dabf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/nightly-release.yaml Resolved
Comment thread .github/workflows/release.yaml Resolved
Comment thread .github/workflows/unstable-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>

@joelmccoy joelmccoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple comments here

Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .goreleaser.snapshot.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread AGENTS.md Resolved
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
bradclawsie
bradclawsie previously approved these changes Aug 28, 2026

@bradclawsie bradclawsie 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.

let's give it a shot!

Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/unstable-release.yaml Resolved
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi slaskawi changed the title feat(release): align unstable releases with CLI Next feat(release): align snapshot releases with CLI Next Sep 2, 2026
@slaskawi
slaskawi requested a lite review from Copilot September 2, 2026 06:00

Copilot AI 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.

🟑 Changes recommended

The snapshot workflow currently tests main rather than the exact captured source SHA and also needs a guardrail to avoid leaving orphaned snapshot tags if publication fails.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi

slaskawi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@codex review
@copilot review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-09-02T06:26:10.934495Z df7f4f1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

Co-authored-by: slaskawi <8417158+slaskawi@users.noreply.github.com>

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@codex review
@copilot review

Addressed in 0484914: prepare now uses read-only contents permission, and the snapshot release test path now validates the captured source_sha by passing an optional ref through the reusable release test workflows.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df7f4f1b3a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .github/workflows/snapshot-release.yaml Resolved
Comment thread .goreleaser.yaml Resolved
…i-265

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>

# Conflicts:
#	.github/workflows/nightly-release.yaml
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Comment thread .github/workflows/snapshot-release.yaml Resolved
@bradclawsie

bradclawsie commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Is there a forked repo in play where we can see this working? The PR feels quite complicated at this point (mostly due to the nature of Github Actions, nothing on you as a dev) and it seems difficult to assert behavior by just reading code.

@joelmccoy joelmccoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly looking good to me. 1 small non blocking nit comment, but Chance's comment should probably be addressed

Comment thread .github/workflows/snapshot-release.yaml Resolved
@joelmccoy

Copy link
Copy Markdown
Member

this also might require a careful merge/rebase since we merged in the release-please pr

…i-265

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>

# Conflicts:
#	.github/workflows/release.yaml
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi

slaskawi commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

We used the same workflow in UDS CLI Next; its published releases are available at https://github.com/defenseunicorns/uds-cli-next/releases. The full flow here creates an upstream tag and prerelease, so I won’t dispatch it without maintainer approval.

@slaskawi

slaskawi commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main and resolved the release workflow conflict, preserving the snapshot-tag exclusion in release.yaml.

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@joelmccoy
joelmccoy merged commit 762b914 into main Sep 8, 2026
41 checks passed
@joelmccoy
joelmccoy deleted the sebastianlaskawiec/cli-265 branch September 8, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants