Skip to content

ci(DCP-2583): automated release process on skip-release tag#414

Merged
dessskris merged 7 commits intomainfrom
DCP-2583-run-release-process
Apr 7, 2026
Merged

ci(DCP-2583): automated release process on skip-release tag#414
dessskris merged 7 commits intomainfrom
DCP-2583-run-release-process

Conversation

@dessskris
Copy link
Copy Markdown
Contributor

@dessskris dessskris commented Apr 2, 2026

This pull request implements a robust, automated workflow for managing releases via GitHub Actions, ensuring consistency and correctness in changelog and release processes. The main changes introduce new workflow files for release gating, automate release creation, and extend the changelog script with version extraction logic and tests.

Release automation and gating:

  • Added .github/workflows/changelog-gate.yml to require that any PR with [run-release] in the title must include a CHANGELOG.md update, preventing accidental releases without changelog entries.
  • Added .github/workflows/release-tag-gate.yml to validate that PR titles use the exact [run-release] tag (case and spelling), catching common mistakes and preventing mis-triggered releases.
  • Introduced .github/workflows/create-release.yml to automate release creation: when a [run-release] PR is merged to main, it extracts the version from CHANGELOG.md, creates a tag, generates release notes, and triggers the build workflow.

Release build workflow enhancements:

  • Updated .github/workflows/release.yml to accept a release tag as input, check out the correct tag, and use it for building and uploading artifacts, enabling both manual and automated (workflow_call) releases. [1] [2]

Changelog tooling improvements:

  • Extended scripts/changelog/main.go with a new extract-version command and ExtractReleaseVersion function to reliably extract the first strict semver version from CHANGELOG.md, skipping "next" and non-semver headings. [1] [2] [3] [4] [5]
  • Added comprehensive unit tests for ExtractReleaseVersion in scripts/changelog/main_test.go, covering edge cases like missing sections, pre-releases, and malformed headings.

Fixes #358

Copilot AI review requested due to automatic review settings April 2, 2026 17:44
@dessskris dessskris requested review from a team as code owners April 2, 2026 17:44
@prolific-snyk
Copy link
Copy Markdown

prolific-snyk commented Apr 2, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds an automated release flow driven by PR title tagging ([run-release]), including CI gates to prevent malformed release triggers and a Go-based changelog version extractor used by the release automation.

Changes:

  • Added GitHub Actions workflows to validate release-tag spelling/casing and require CHANGELOG.md updates when [run-release] is present.
  • Added an automated “create tag + GitHub release + build artifacts” workflow on merge to main for [run-release] PRs.
  • Extended scripts/changelog with an extract-version command plus unit tests to reliably extract the next release version from CHANGELOG.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
scripts/changelog/main.go Adds extract-version command and strict semver extraction helper used by release automation.
scripts/changelog/main_test.go Adds unit tests for strict release-version extraction edge cases.
.github/workflows/release.yml Makes release build workflow reusable via workflow_call and checks out the requested tag.
.github/workflows/create-release.yml Creates tag + GitHub release on merged [run-release] PRs and triggers the build workflow.
.github/workflows/changelog-gate.yml Gates [run-release] PRs to ensure CHANGELOG.md is modified.
.github/workflows/release-tag-gate.yml Validates [run-release] tag spelling/casing in PR titles and rejects common mistakes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

@dessskris dessskris added the dct-ready-for-review Triggers Slack notification when PR is ready for review label Apr 6, 2026

on:
pull_request:
types: [closed]
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.

Is this going to try and create the release if someone opened a PR but then decided not to go ahead with the change and closed the PR in the UI?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ohh well spotted boss 🌟 I had Claude double check this, and it's safe because our finalize-release job is gated on:

github.event.pull_request.merged == true &&
contains(github.event.pull_request.title, '[run-release]')

So if someone closes without merging, merged is false, that job is skipped, and no tag / release / build-release runs. You may still see a workflow run in the Actions tab with the job skipped — that’s expected.

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.

Excellent, sorry I missed that 🙏

@dessskris dessskris merged commit a917d9b into main Apr 7, 2026
7 checks passed
@dessskris dessskris deleted the DCP-2583-run-release-process branch April 7, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-facing dct-ready-for-review Triggers Slack notification when PR is ready for review team-dct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automated Release Process

5 participants