Skip to content

feat: Add GitHub Action for automatic release creation - #614

Closed
maxtechera wants to merge 1 commit into
mainfrom
feat/add-production-release-workflow
Closed

feat: Add GitHub Action for automatic release creation#614
maxtechera wants to merge 1 commit into
mainfrom
feat/add-production-release-workflow

Conversation

@maxtechera

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new GitHub Action workflow that automatically creates GitHub releases when PRs are merged to production
  • Complements the existing semantic-release workflow with a more flexible approach

Features

  • Automatic version detection from PR title, branch name, or release notes files
  • Release notes integration from dedicated markdown files or PR body
  • Smart release handling - creates new releases or updates existing ones
  • PR feedback - posts confirmation comments on merged PRs

How it works

  1. Triggers when a PR is merged to the production branch
  2. Extracts version number from (in order of priority):
    • PR title (e.g., "Release: v1.7.1")
    • Branch name
    • Latest release notes file in release-notes/
    • Date-based fallback
  3. Creates or updates a GitHub release with the extracted version
  4. Posts a comment on the PR confirming the release creation

Test Plan

Notes

This workflow runs alongside the existing semantic-release workflow and provides a more flexible approach for creating releases from staging-to-production PRs.

🤖 Generated with Claude Code

…merge

- Creates GitHub releases automatically when PRs are merged to production
- Extracts version from PR title or release notes
- Reads release notes from dedicated files or PR body
- Handles both new releases and updates to existing ones
- Posts confirmation comment on PR after release creation

This ensures consistent release management and automates the release
process for production deployments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

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

ℹ️ 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 on lines +132 to +146
gh release edit "$VERSION" \
--title "Release $VERSION" \
--notes "## Release $VERSION

This release was automatically updated from PR #${{ github.event.pull_request.number }}

**PR Title:** ${{ github.event.pull_request.title }}
**Merged by:** @${{ github.event.pull_request.merged_by.login }}
**Merge Date:** ${{ github.event.pull_request.merged_at }}

---

${{ steps.release_notes.outputs.notes }}

---

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Escape release notes before passing to gh CLI

The update path shells the release notes directly into gh release edit via --notes "… ${{ steps.release_notes.outputs.notes }} …". Because the expression is interpolated before the script runs, any double quotes, backticks, or command substitutions in the release notes (which can easily appear in PR bodies or markdown files) will break the surrounding quoted string and cause the job to fail whenever it tries to update an existing release. Consider piping the notes through --notes-file or a heredoc so the CLI receives the content without being interpreted by the shell.

Useful? React with 👍 / 👎.

@maxtechera maxtechera closed this Oct 20, 2025
@maxtechera
maxtechera deleted the feat/add-production-release-workflow branch October 20, 2025 20:36
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