Skip to content

Add dry-run mode to release workflow and update Linux packaging#128

Draft
leynos wants to merge 1 commit intomainfrom
terragon/update-linux-packaging-release-dry-run-3a4vbl
Draft

Add dry-run mode to release workflow and update Linux packaging#128
leynos wants to merge 1 commit intomainfrom
terragon/update-linux-packaging-release-dry-run-3a4vbl

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Dec 26, 2025

Summary

  • Introduces a dry-run mode for the release workflow to allow non-destructive validation of builds and packaging
  • Adds a dedicated Release Dry Run workflow that reuses the main release workflow with dry-run enabled on pull request events
  • Improves versioning logic: derive version from vX.Y.Z tags, fallback to 0.0.0-dev for non-tag builds
  • Bumps actions for rust-build-release and linux-packages to newer revisions
  • Guards artefact upload and GitHub release publishing behind the dry-run flag

Changes

CI/CD Workflows

  • .github/workflows/release.yml:
    • Adds a workflow_call input dry-run (boolean, default false)
    • Versioning logic updated to support tag-based and dev builds
    • Upload artefacts and release publishing steps are conditioned on !inputs.dry-run
  • .github/workflows/release-dry-run.yml: (new)
    • Release Dry Run workflow triggered by PR events (opened, synchronize, reopened, ready_for_review)
    • Calls the main release workflow with dry-run: true and inherits secrets

Versioning

  • Release versioning now:
    • If GITHUB_REF_NAME matches vX.Y.Z, RELEASE_VERSION is the numeric part after v
    • Otherwise RELEASE_VERSION defaults to 0.0.0-dev

Packaging

  • Action references updated to newer revisions for:
    • rust-build-release
    • linux-packages
  • Packaging still uses the same inputs (bin-name, package-name, etc.) but now in newer tooling revisions

Release & Artefacts

  • Upload artefacts step is skipped during dry-run
  • GitHub release publishing is skipped during dry-run

Tests

  • Webhook/PR-based dry-run validation can be tested by opening or updating a PR targeting the branch:
    • Observe that the dry-run workflow runs with dry-run: true
    • Build and packaging steps execute, but no artefacts are uploaded
    • The release publishing step is skipped

Test plan

  • Create a PR to trigger the Release Dry Run workflow and verify it calls the main release workflow with dry-run enabled
  • Confirm that build and packaging complete without uploading artefacts
  • Verify that the GitHub release is not created when in dry-run mode
  • Tag a release (e.g., v1.2.3) to ensure the standard release flow still publishes artefacts and creates the release
  • Validate that non-tag builds default to 0.0.0-dev in the release version output

🌿 Generated by Terry


ℹ️ Tag @terragon-labs to ask questions and address PR feedback

📎 Task: https://www.terragonlabs.com/task/376cfa58-f5ba-40c0-914e-bceca121bcd8

Summary by Sourcery

Introduce a dry-runable release workflow and supporting PR-triggered validation flow.

New Features:

  • Add a reusable release workflow input to enable dry-run builds without publishing artefacts or creating a GitHub release.
  • Create a Release Dry Run workflow that runs on pull requests and invokes the main release workflow in dry-run mode.

Enhancements:

  • Update release versioning to derive semantic versions from vX.Y.Z tags and fall back to a 0.0.0-dev version for non-tag builds.
  • Bump shared rust-build-release and linux-packages GitHub Actions to newer revisions.
  • Guard artefact upload and GitHub release publishing steps behind the dry-run flag.

- Add a new workflow `release-dry-run.yml` triggered on pull requests to perform dry-run releases.
- Update `release.yml` to support a dry-run mode that builds and packages without uploading artifacts or creating a GitHub release.
- Allow the main release workflow to be called with a `dry-run` input to enable testing release process without side effects.

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Dec 26, 2025

Reviewer's Guide

Adds a dry-run capability to the release workflow, introduces a PR-triggered dry-run wrapper workflow, tightens version derivation from tags with a dev fallback, and bumps shared packaging/build actions while ensuring artefact upload and release publishing are skipped when dry-running.

Sequence diagram for PR-triggered dry-run release workflow

sequenceDiagram
  actor Developer
  participant GitHub
  participant ReleaseDryRunWorkflow
  participant ReleaseWorkflow
  participant BuildPackagesJob
  participant ReleaseJob

  Developer->>GitHub: Open or update pull_request
  GitHub-->>ReleaseDryRunWorkflow: Trigger pull_request event

  ReleaseDryRunWorkflow->>ReleaseWorkflow: workflow_call with dry-run true
  ReleaseWorkflow->>BuildPackagesJob: Start job build-packages

  BuildPackagesJob->>BuildPackagesJob: Determine RELEASE_VERSION
  BuildPackagesJob->>BuildPackagesJob: Build binaries (rust-build-release)
  BuildPackagesJob->>BuildPackagesJob: Package binaries (linux-packages)
  BuildPackagesJob-->>BuildPackagesJob: Skip Upload artefacts (dry-run true)

  ReleaseWorkflow-->>ReleaseJob: Do not start job (dry-run true)
  ReleaseJob-->>Developer: GitHub release not created (skipped)
Loading

File-Level Changes

Change Details Files
Enable the main release workflow to be called as a reusable workflow with an optional dry-run mode that suppresses artefact upload and GitHub release creation.
  • Add workflow_call trigger with a boolean dry-run input defaulting to false
  • Guard the artefact upload step with a condition that checks the dry-run input
  • Guard the GitHub release job with a condition that checks the dry-run input
.github/workflows/release.yml
Refine release version computation to use vX.Y.Z tags when present and fall back to a dev version for non-tagged builds.
  • Replace unconditional stripping of leading v from GITHUB_REF_NAME with a regex check for vX.Y.Z
  • Set RELEASE_VERSION to 0.0.0-dev when the ref does not match a semantic tag
.github/workflows/release.yml
Update Rust build and Linux packaging steps to newer revisions of shared GitHub Actions.
  • Bump leynos/shared-actions rust-build-release action to a newer commit hash
  • Bump leynos/shared-actions linux-packages action to a newer commit hash
.github/workflows/release.yml
Introduce a PR-triggered Release Dry Run workflow that delegates to the main release workflow with dry-run enabled.
  • Create a new workflow triggered on pull_request events for several PR lifecycle types
  • Configure the job to call the main release workflow via uses, passing dry-run: true and inheriting secrets
.github/workflows/release-dry-run.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 26, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch terragon/update-linux-packaging-release-dry-run-3a4vbl

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant