Skip to content

chore: fixes release workflows failures#2514

Merged
stalniy merged 1 commit intomainfrom
chore/fix-release-workflows
Jan 16, 2026
Merged

chore: fixes release workflows failures#2514
stalniy merged 1 commit intomainfrom
chore/fix-release-workflows

Conversation

@stalniy
Copy link
Contributor

@stalniy stalniy commented Jan 16, 2026

What

  1. Fixes case when there is nothing to release and create-pre-release fails because there are no releasable changes: https://github.com/akash-network/console/actions/runs/20957855412/job/60226904731
  2. Exit early when app is not released or push is not a release PR. Can be a dependency update in package.json or scripts field update which trigger release on push to main (not on merge of release PR)

Summary by CodeRabbit

  • Chores
    • Improved pre-release automation to skip unnecessary commits/PRs when no changes are detected and to gate subsequent steps accordingly.
    • Strengthened release workflow validation for PR-based releases, added app-alias handling for consistent tag/changelog resolution, and enhanced changelog output for clearer release notes.

✏️ Tip: You can customize this high-level summary in your review settings.

@stalniy stalniy requested a review from a team as a code owner January 16, 2026 04:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

Adds change-detection gating to the pre-release PR workflow and refactors the reusable release workflow: updates checkout, introduces an associated-pr step with PR validation and app aliasing, and standardizes git tag and changelog handling via app_alias.

Changes

Cohort / File(s) Summary
Pre-release PR workflow
​.github/workflows/create-pre-release-pr.yml
Adds "Check for Changes" step (git status --porcelain) and gates Check Existing PR, Commit Changes, and Create Pull Request to run only when changes exist.
Reusable release workflow
​.github/workflows/reusable-create-github-release.yml
Bumps actions/checkout to v6; adds local action step ./.github/actions/associated-pr; introduces PR validation (PR_NUMBER, PR_TITLE) and conditional changelog/version steps; adds APP_ALIASES and computes app_alias for unified git_tag; outputs multiline changelog to GITHUB_OUTPUT.

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as Workflow
  participant Git as Git (repo)
  participant Action as associated-pr action
  participant GH as GitHub API

  Workflow->>Git: run `git status --porcelain` (set has_changes)
  alt has_changes == false
    Workflow-->>Workflow: skip check/commit/create steps
  else has_changes == true
    Workflow->>Action: run associated-pr (find PR_NUMBER/PR_TITLE)
    Action->>GH: fetch PR details
    GH-->>Action: PR metadata (title, files)
    Action-->>Workflow: export PR_NUMBER, PR_TITLE
    Workflow->>GH: check existing PR (conditional)
    GH-->>Workflow: existing PR result
    alt need to create tag/PR
      Workflow->>Git: prepare commit & tag (use app_alias/v<version>)
      Workflow->>GH: create PR and/or tag
      GH-->>Workflow: PR number / tag created
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ygrishajev
  • baktun14

Poem

🐇 With tiny paws I check the tree,

No changes? then let branches be.
When tags align and names agree,
I hop and craft the PR with glee.
A ribboned release — carrot for me! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: fixes release workflows failures' directly addresses the main objective of the PR, which is to fix failures in release workflows. It aligns with the core changes made to both workflow files.
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.


🧹 Recent nitpick comments
.github/workflows/reusable-create-github-release.yml (1)

99-108: Consider migrating from deprecated actions/create-release@v1.

The actions/create-release action has been archived by GitHub and is no longer maintained. While it still functions, consider migrating to alternatives like softprops/action-gh-release or using the GitHub CLI directly for better long-term support.

This is not blocking for this PR but worth tracking for future maintenance.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3604541 and 277f6e6.

📒 Files selected for processing (2)
  • .github/workflows/create-pre-release-pr.yml
  • .github/workflows/reusable-create-github-release.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/create-pre-release-pr.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
.github/workflows/reusable-create-github-release.yml (4)

39-51: Well-structured conditional execution and environment setup.

The conditional check for PR number and the APP_ALIASES JSON mapping are correctly implemented. The use of >- for the multiline JSON string preserves the content properly.


52-70: PR validation logic correctly implemented.

The glob pattern matching issue from the previous review has been addressed by using [[ ]] (line 58). The validation flow properly:

  1. Exits early if no PR number is available
  2. Validates the PR title matches the release pattern
  3. Checks if the app's CHANGELOG.md was modified in the PR

Using exit 0 for non-release scenarios allows the workflow to complete gracefully without failing the CI.


72-97: Clean implementation for version and changelog handling.

The dead code issue from the previous review has been resolved - git_tag is now properly assigned only after app_alias and current_version are computed (line 82). The app alias lookup with jq fallback ('.[$app] // $app') elegantly handles both aliased and non-aliased app names.

The heredoc pattern for multiline changelog output (lines 93-95) correctly handles multi-line content in GitHub Actions outputs.


31-37: No action required — actions/checkout@v6 is a released, stable version with documented usage and changes. This is a valid upgrade.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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

Copy link
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: 2

🤖 Fix all issues with AI agents
In @.github/workflows/reusable-create-github-release.yml:
- Around line 79-83: Remove the dead pre-refactor assignment to git_tag that
uses an undefined current_version: delete the line setting
git_tag="$current_version" so git_tag is only set after computing app_alias and
current_version (the later assignment git_tag="$app_alias/v$current_version"
should remain); update or verify the surrounding block that uses APP_ALIASES,
APP_NAME, and package_file so git_tag is only defined once using app_alias and
current_version.
- Around line 53-61: Replace the POSIX [ ] test with a Bash [[ ]] glob match for
PR_TITLE and use a "starts with" pattern; specifically, change the conditional
that currently reads the bracket test against PR_TITLE to use [[ $PR_TITLE !=
chore\(release\):\ update\ versions\ and\ changelogs* ]] (or the equivalent [[
$PR_TITLE != "chore(release): update versions and changelogs"* ]]) so glob
pattern matching works as intended and the script correctly exits when PR_TITLE
does not start with the release prefix; keep the PR_NUMBER check as-is and only
modify the PR_TITLE conditional that uses the PR_TITLE variable and the existing
conditional block.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdbbae1 and 3604541.

📒 Files selected for processing (2)
  • .github/workflows/create-pre-release-pr.yml
  • .github/workflows/reusable-create-github-release.yml
🧰 Additional context used
🪛 GitHub Actions: GitHub Actions Linting
.github/workflows/reusable-create-github-release.yml

[error] 52-52: shellcheck reported issue: SC2081: '...globs' can't match [ .. ]. Use [[ .. ]] or case statement. (in script invoked by 'gh actionlint')

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
.github/workflows/create-pre-release-pr.yml (4)

96-105: LGTM - Effective early exit when no releasable changes.

The change detection logic using git status --porcelain is correct and addresses the PR objective of avoiding failures when there are no releasable changes. The step properly outputs the result for downstream conditional execution.


107-109: LGTM - Proper gating of PR check.

Correctly skips the existing PR check when there are no changes to release.


123-124: LGTM - Correct conditional for commit step.

Ensures the commit step only runs when there are actual changes to commit.


163-164: LGTM - Combined conditions are logically correct.

The condition env.pr_number == '' && steps.check-changes.outputs.has_changes == 'true' ensures a PR is created only when:

  1. There are changes to release
  2. No existing release PR exists

When has_changes is false, the "Check Existing PR" step is skipped, leaving pr_number unset, but the second condition already prevents PR creation in that case.

.github/workflows/reusable-create-github-release.yml (4)

40-51: LGTM - Good use of conditional gating and environment variables.

The conditional on line 40 and the structured environment variables for PR context and app aliases are well organized.


63-72: LGTM - Robust app release detection.

Using gh pr view to check if the app's CHANGELOG.md was modified in the PR is a reliable way to determine if the app was released. This addresses the PR objective of exiting early when the app is not released.


86-98: LGTM - Tag creation and changelog extraction logic is correct.

The tag existence check and multiline changelog output using heredoc syntax are properly implemented.


32-37: No action needed. actions/checkout@v6 is the latest released version and is valid as of January 2026.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@stalniy stalniy force-pushed the chore/fix-release-workflows branch from 3604541 to 78c2318 Compare January 16, 2026 05:06
@stalniy stalniy force-pushed the chore/fix-release-workflows branch from 78c2318 to 277f6e6 Compare January 16, 2026 05:09
@stalniy stalniy merged commit 52ed0b8 into main Jan 16, 2026
67 checks passed
@stalniy stalniy deleted the chore/fix-release-workflows branch January 16, 2026 09: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

Comments