Skip to content

ci: split downstream release workflow into reusable stages - #329

Merged
c-vigo merged 5 commits into
devfrom
feature/326-reusable-release-cycle-workflows
Mar 16, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/326-reusable-release-cycle-workflows

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Split downstream release execution into reusable local workflows with a project-owned extension hook, add a release contract validator, and introduce a dedicated prepare-release workflow for branch preparation. This also documents the downstream contract and candidate/final release behavior.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • assets/workspace/.github/workflows/release.yml
    • Replaced monolithic release flow with orchestration over release-core, release-extension, and release-publish
    • Added release-kind dispatch input and propagated mapped inputs into reusable workflows
    • Kept rollback handling in the orchestrator with outputs from core
  • assets/workspace/.github/workflows/release-core.yml
    • Added core validation/finalization/test stages behind workflow_call
    • Added release_kind support for candidate (X.Y.Z-rcN) and final (X.Y.Z) behavior
    • Added publish tag computation and candidate sequencing logic
  • assets/workspace/.github/workflows/release-extension.yml
    • Added default no-op extension contract for downstream project-owned release steps
  • assets/workspace/.github/workflows/release-publish.yml
    • Added isolated publish phase that tags and creates pre-release/final GitHub releases
  • assets/workspace/.github/actions/validate-contract/action.yml
    • Added shared contract version validation to enforce compatible reusable workflow interfaces
  • assets/workspace/.github/workflows/prepare-release.yml
    • Added standalone release preparation workflow (workflow_dispatch) for release branch setup and draft PR creation
  • assets/workspace/justfile.project
    • Added commented release helper examples for dispatching prepare/finalize/candidate workflows
  • assets/init-workspace.sh
    • Preserved downstream release-extension.yml on --force workspace upgrades
  • docs/DOWNSTREAM_RELEASE.md, docs/RELEASE_CYCLE.md, CHANGELOG.md
    • Documented downstream release contract, extension model, and release mode behavior

Changelog Entry

Added

  • Split downstream release workflow with project-owned extension hook (#326)
    • Add local workflow_call release phases (release-core.yml, release-publish.yml) and a lightweight release.yml orchestrator in assets/workspace/.github/workflows/
    • Add release_kind support with candidate mode (X.Y.Z-rcN) and final mode (X.Y.Z) in downstream release workflows
    • Candidate mode now auto-computes the next RC tag, skips CHANGELOG finalization/sync-issues, and publishes a GitHub pre-release
    • Add project-owned release-extension.yml stub and preserve it during init-workspace.sh --force upgrades
    • Add validate-contract composite action for single-source contract version validation
    • Add downstream release contract documentation and GHCR extension example in docs/DOWNSTREAM_RELEASE.md

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

The branch is split into three atomic commits to keep review boundaries clear (workflow architecture, prepare-release flow, docs/changelog).

Refs: #326

@c-vigo c-vigo self-assigned this Mar 16, 2026
@c-vigo
c-vigo requested a review from Copilot March 16, 2026 16:10

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

This PR restructures the downstream (workspace template) release automation by splitting the previous monolithic release workflow into reusable workflow_call stages, adding a contract-version validator, and introducing a dedicated prepare-release workflow and associated documentation for downstream adoption.

Changes:

  • Replaced downstream release.yml with an orchestrator that calls release-core, release-extension (project-owned hook), and release-publish.
  • Added prepare-release.yml to automate release branch creation and draft PR creation.
  • Added contract validation (validate-contract) and documented the downstream release contract and modes (candidate vs final).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
docs/RELEASE_CYCLE.md Adds downstream integration pointers and links to downstream release workflow docs.
docs/DOWNSTREAM_RELEASE.md New contract documentation for the split downstream release workflows and extension hook.
assets/workspace/justfile.project Adds commented helper examples for manually dispatching prepare/final/candidate workflows.
assets/workspace/.github/workflows/release.yml Converts release flow into an orchestrator over core/extension/publish and keeps rollback handling.
assets/workspace/.github/workflows/release-core.yml New reusable “core” stage: validate/finalize/test + candidate/final behavior + tag computation.
assets/workspace/.github/workflows/release-extension.yml New default no-op extension hook workflow for downstream-owned customization.
assets/workspace/.github/workflows/release-publish.yml New reusable publish stage: tag + GitHub Release creation (pre-release for candidates).
assets/workspace/.github/workflows/prepare-release.yml New workflow to prepare release branches, freeze/reset changelog, and open a draft PR.
assets/workspace/.github/actions/validate-contract/action.yml New composite action enforcing a single-source contract version.
assets/init-workspace.sh Preserves downstream-owned release-extension.yml during --force upgrades.
CHANGELOG.md Adds an Unreleased entry describing the downstream release workflow split and docs.

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

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

This PR refactors the downstream (workspace template) release automation by splitting a monolithic release.yml into reusable, contract-versioned workflow stages (core, extension, publish) and adding a standalone prepare-release workflow, with accompanying documentation updates.

Changes:

  • Introduces reusable workflow stages (release-core.yml, release-extension.yml, release-publish.yml) orchestrated by a simplified release.yml, plus a shared contract validator action.
  • Adds prepare-release.yml to create/freeze release branches and draft PRs, and preserves downstream-owned release-extension.yml during forced workspace upgrades.
  • Documents the downstream release contract and release-mode behavior, and records the change in the changelog.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/RELEASE_CYCLE.md Adds downstream integration notes and links to the downstream release contract doc.
docs/DOWNSTREAM_RELEASE.md New document defining the downstream release workflow contract, extension hook, and release modes.
assets/workspace/justfile.project Adds commented helper examples for dispatching prepare/final/candidate workflows.
assets/workspace/.github/workflows/release.yml Replaces monolith with orchestration over core/extension/publish plus rollback.
assets/workspace/.github/workflows/release-core.yml New reusable “core” stage: validation, optional finalization, and tests; computes publish tag.
assets/workspace/.github/workflows/release-extension.yml New downstream-owned extension hook (default no-op) with contract validation.
assets/workspace/.github/workflows/release-publish.yml New reusable publish stage: tags and creates GitHub Release (pre-release for candidates).
assets/workspace/.github/workflows/prepare-release.yml New workflow to prepare release branches, freeze changelog, and open a draft PR.
assets/workspace/.github/actions/validate-contract/action.yml New composite action enforcing contract version matching.
assets/init-workspace.sh Preserves .github/workflows/release-extension.yml on --force upgrades.
CHANGELOG.md Adds an Unreleased entry describing the downstream release workflow split and contract.

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

@c-vigo
c-vigo merged commit 6ebf887 into dev Mar 16, 2026
12 checks passed
@c-vigo
c-vigo deleted the feature/326-reusable-release-cycle-workflows branch March 16, 2026 16:45
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.

2 participants