Add automated weekly patch release#170
Conversation
📝 WalkthroughWalkthroughThree GitHub Actions workflow files are modified: a new automated weekly release workflow is introduced that conditionally runs CI and creates release tags based on detected changes since the latest tag, while two existing workflows are updated to be reusable via Changes
Sequence DiagramsequenceDiagram
participant Trigger as Schedule/Manual Trigger
participant CheckChanges as check-changes Job
participant CI as ci Job
participant CreateTag as create-tag Job
participant Repo as Repository
Trigger->>CheckChanges: Run workflow
CheckChanges->>Repo: Fetch all tags
CheckChanges->>Repo: Get latest v0.*.* tag
CheckChanges->>Repo: Check commits since tag
CheckChanges-->>CI: Set has_changes output
alt has_changes == true
CI->>CI: Run CI workflow
CI-->>CreateTag: CI complete
CreateTag->>Repo: Create patch bump release tag
CreateTag->>Repo: Push tag to main
else has_changes == false
Note over CI,CreateTag: Both jobs skipped
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/create-release-tag.yml:
- Around line 19-23: The workflow input "release_ref" currently has both
required: true and a default value, which is inconsistent; edit the GitHub
Actions workflow input definition for release_ref to remove either the required:
true line or the default key—preferably remove required: true so callers may
omit the input and the default "main" is used; locate the release_ref input
block in the create-release-tag.yml and update it accordingly (keep description
and type as-is).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 2a804693-e5ac-43e9-b0c3-85942c061ff1
📒 Files selected for processing (3)
.github/workflows/automated-release.yml.github/workflows/ci.yml.github/workflows/create-release-tag.yml
| release_ref: | ||
| description: Git ref to tag | ||
| required: true | ||
| default: main | ||
| type: string |
There was a problem hiding this comment.
Remove required: true or default for release_ref input.
The static analysis tool flagged this: when an input is marked as required: true, its default value is never used because callers must always provide a value. This creates a semantic inconsistency.
Since the automated-release workflow explicitly provides release_ref: main, consider removing required: true to allow future callers to optionally rely on the default:
Proposed fix
workflow_call:
inputs:
release_ref:
description: Git ref to tag
- required: true
+ required: false
default: main
type: string📝 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.
| release_ref: | |
| description: Git ref to tag | |
| required: true | |
| default: main | |
| type: string | |
| release_ref: | |
| description: Git ref to tag | |
| required: false | |
| default: main | |
| type: string |
🧰 Tools
🪛 actionlint (1.7.11)
[error] 22-22: input "release_ref" of workflow_call event has the default value "main", but it is also required. if an input is marked as required, its default value will never be used
(events)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/create-release-tag.yml around lines 19 - 23, The workflow
input "release_ref" currently has both required: true and a default value, which
is inconsistent; edit the GitHub Actions workflow input definition for
release_ref to remove either the required: true line or the default
key—preferably remove required: true so callers may omit the input and the
default "main" is used; locate the release_ref input block in the
create-release-tag.yml and update it accordingly (keep description and type
as-is).
Motivation
Releases currently require a manual trigger. This automates patch releases every Thursday so we ship consistently without manual intervention.
Changes
automated-release.ymlworkflow: runs every Thursday at 10 AM UTC, checks for commits since the last tag, runs CI fresh, and creates a patch tag if everything is greenci.ymlcallable as a reusable workflow (workflow_call) so the automated release can run CI before taggingcreate-release-tag.ymlcallable as a reusable workflow (workflow_call) so the automated release reuses the existing tag creation logic without duplicationTests
Not tested yet —
workflow_dispatchrequires the workflow to exist on the default branch, so it can only be triggered after this is merged:Closes DRG-667