Skip to content

Release automation#7074

Draft
BlackYps wants to merge 23 commits intodevelopfrom
release-automation
Draft

Release automation#7074
BlackYps wants to merge 23 commits intodevelopfrom
release-automation

Conversation

@BlackYps
Copy link
Copy Markdown
Contributor

@BlackYps BlackYps commented Apr 1, 2026

Automate the release process more.
The run doesn't pick up my changes to other files because I check out develop. I need to fix that.
Fixed. Don't forget to remove the on push trigger and set the branch back to develop before merging.

Checklist

Summary by CodeRabbit

  • Chores
    • Streamlined release preparation workflow with automated changelog generation and pull request creation.
    • Updated changelog entry template with improved formatting and metadata structure.

@github-actions github-actions bot marked this pull request as draft April 1, 2026 13:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

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.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e7dc9d86-db87-4a5f-8cc3-6331ba7c924c

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull request restructures the GitHub Actions changelog workflow by removing the bundle job and adding a comprehensive release-preparation job that automates the complete release pipeline: version bumping, changelog post generation, changelogData updates, and GitHub PR creation. The changelog template gains Jekyll front-matter, and a shell script's filename handling is simplified.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/docs-changelog.yaml
Replaced bundle job with new release-preparation job that: checks out the fa repository, extracts and bumps versions from lua/version.lua, generates changelog posts to docs/_posts/, updates changelog­Data.lua, removes snippet files, and creates a GitHub PR via actions/github-script. Simplified input descriptions.
Bash Script
.github/workflows/scripts/bash/changelog-combine.sh
Modified output filename handling to use argument value directly as the output path instead of appending .md extension.
Changelog Template
changelog/snippets/sections/template-header.md
Added Jekyll front-matter block with layout, title, and permalink fields; updated placeholder text and sign-off signature.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Actions
    participant FA as FA Repository
    participant Scripts as changelog-combine.sh
    participant GHApi as GitHub API
    
    GH->>FA: Checkout develop branch
    GH->>FA: Extract version from lua/version.lua
    GH->>GH: Compute next patch version
    GH->>GH: Create changelog branch
    Scripts->>Scripts: Generate changelog post
    GH->>FA: Update lua/ui/lobby/changelogData.lua
    GH->>FA: Remove changelog/snippets/*.md
    GH->>FA: Bump version in lua/version.lua
    GH->>FA: Commit all changes
    GH->>FA: Push branch
    GH->>GHApi: Create Pull Request to develop
    GHApi-->>GH: PR Created
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hops with glee through version trees,
Changelog snippets dance with ease,
Branch and bump and PR away,
Automation saves the day! 🎉

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks required sections: no detailed description of changes, no testing documentation, and minimal context provided. Add a clear description of the proposed changes, document testing performed, and provide additional context about the automation improvements.
Title check ❓ Inconclusive The title 'Release automation' is vague and overly generic; it doesn't clearly convey the main changes like changelog consolidation, version bumping, or automated PR creation. Consider a more specific title such as 'Automate release process with changelog consolidation and version bumping' to better describe the primary changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-automation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/docs-changelog.yaml:
- Around line 92-98: The workflow currently hard-codes ref: develop in the
actions/checkout@v4 step; replace this with a split-checkout pattern so the job
keeps the workflow scripts from the workflow branch but checks out the target
release ref for files to be modified: keep one checkout that gets the workflow
branch (so scripts remain from the workflow run) and add/modify the repository
checkout used for modifying changelog files to use ref: ${{ inputs.reference }}
(reference the actions/checkout@v4 step and the inputs.reference variable) so
the preparation job uses the selected release ref instead of always using
develop.
- Around line 86-90: The release-preparation job is running during pull_request
events and must be skipped there to avoid creating branches/PRs or failing on
forked PRs; update the release-preparation job definition (job name:
release-preparation) to add a conditional that prevents execution when
github.event_name == "pull_request" (for example using an if: check on the job)
so it only runs on push/other non-pull_request events, ensuring the steps that
create branches, push, or open PRs are not executed during PR validation.
- Around line 101-115: The workflow uses unquoted redirects to $GITHUB_OUTPUT in
the version and meta steps (echo "old_version=... " >> $GITHUB_OUTPUT, echo
"version=... " >> $GITHUB_OUTPUT, echo "date=... " >> $GITHUB_OUTPUT, echo
"branch=... " >> $GITHUB_OUTPUT) which triggers SC2086; update those echo
redirections to quote the variable (use ">> \"$GITHUB_OUTPUT\"" instead of ">>
$GITHUB_OUTPUT") so the shellcheck/actionlint warning is resolved while keeping
the same output keys and values.

In `@changelog/snippets/sections/template-header.md`:
- Around line 7-13: The template header currently contains merge-ready
placeholders that get shipped into changelogs—specifically the header line "#
Game version XYZW (1st of Month, Year)" and the literal strings "1st of Month,
Year", "Your description here.", and "BlackYps"; update the template so it uses
the release workflow variables (e.g. replace "XYZW" with the workflow token you
use, or a neutral token like {{VERSION}}) or neutral copy (remove the hard-coded
date and author and replace the description line with a neutral prompt or
optional placeholder), and ensure the template text and tokens match what the
release automation expects so no placeholder text is emitted in autogenerated
changelogs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9368bc8c-ae46-4583-8ba5-0f035463a1cc

📥 Commits

Reviewing files that changed from the base of the PR and between 132476b and e8c690e.

📒 Files selected for processing (3)
  • .github/workflows/docs-changelog.yaml
  • .github/workflows/scripts/bash/changelog-combine.sh
  • changelog/snippets/sections/template-header.md

Comment on lines +86 to 90
release-preparation:
name: Prepare patch changelog
runs-on: ubuntu-latest
needs: [verify]
needs: verify
steps:
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.

⚠️ Potential issue | 🟠 Major

Skip release-preparation during pull_request runs.

Because Lines 41-43 still include pull_request, this new job will also run during snippet PR validation and try to create a branch, push it, and open another PR. Fork PRs will fail at Line 95 because the SSH secret is unavailable there, while same-repo PRs will create unintended side effects.

🛑 Minimal guard
  release-preparation:
    name: Prepare patch changelog
    runs-on: ubuntu-latest
    needs: verify
+   if: github.event_name != 'pull_request'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
release-preparation:
name: Prepare patch changelog
runs-on: ubuntu-latest
needs: [verify]
needs: verify
steps:
release-preparation:
name: Prepare patch changelog
runs-on: ubuntu-latest
needs: verify
if: github.event_name != 'pull_request'
steps:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docs-changelog.yaml around lines 86 - 90, The
release-preparation job is running during pull_request events and must be
skipped there to avoid creating branches/PRs or failing on forked PRs; update
the release-preparation job definition (job name: release-preparation) to add a
conditional that prevents execution when github.event_name == "pull_request"
(for example using an if: check on the job) so it only runs on push/other
non-pull_request events, ensuring the steps that create branches, push, or open
PRs are not executed during PR validation.

@BlackYps BlackYps mentioned this pull request Apr 1, 2026
@BlackYps BlackYps force-pushed the release-automation branch 2 times, most recently from 6c8e12b to b823d9c Compare April 10, 2026 18:47
@BlackYps BlackYps force-pushed the release-automation branch from b823d9c to bad6e0d Compare April 11, 2026 23:29
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