Skip to content

chore: Refactor release and PR workflow - #641

Merged
rabilrbl merged 17 commits into
developfrom
bugfix/sync-release-version-develop
Aug 18, 2025
Merged

rabilrbl merged 17 commits into
developfrom
bugfix/sync-release-version-develop

Conversation

@rabilrbl

Copy link
Copy Markdown
Collaborator

This pull request refactors the release workflow by moving complex shell logic out of the GitHub Actions YAML and into dedicated scripts, making the workflow easier to maintain and more modular. It also updates the release action version and makes minor improvements to workflow triggers and environment variable usage.

Workflow modularization and refactoring:

  • Extracted the version increment logic from the workflow YAML into a new script scripts/increment-version.sh for maintainability and clarity. [1] [2]
  • Moved the binary build logic into a new script scripts/build-binaries.sh, simplifying the YAML and making it easier to update build logic in the future. [1] [2]

Workflow improvements:

  • Updated the release action from softprops/action-gh-release@v1 to v2 and switched from using the GITHUB_TOKEN environment variable to the token input parameter for better compatibility.
  • Broadened the paths-ignore filter to ignore all changes under .github/**, reducing unnecessary workflow runs on irrelevant changes.

@rabilrbl rabilrbl added the enhancement New feature or request label Aug 18, 2025
Copilot AI review requested due to automatic review settings August 18, 2025 15:52

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Summary of Changes

Hello @rabilrbl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's release workflow by externalizing complex shell scripting logic from the GitHub Actions YAML into dedicated, maintainable scripts. This change enhances the clarity and modularity of the CI/CD pipeline. Furthermore, it includes an update to the release action version and refines workflow triggers to improve efficiency.

Highlights

  • Workflow Modularization and Refactoring: The logic for incrementing the version and building binaries has been extracted from the GitHub Actions YAML into dedicated shell scripts (scripts/increment-version.sh and scripts/build-binaries.sh). This significantly improves the modularity, readability, and maintainability of the workflow.
  • Release Action Version Update: The softprops/action-gh-release action has been updated from v1 to v2. Additionally, the method for passing the GitHub token has been changed from using the GITHUB_TOKEN environment variable to the token input parameter, aligning with best practices for action usage.
  • Workflow Trigger Optimization: The paths-ignore filter in the workflow has been broadened to ignore all changes within the .github/** directory. This optimization prevents unnecessary workflow runs when only changes to GitHub Actions configurations or other related files occur.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request is a great step towards improving the maintainability of the CI/CD workflows by extracting complex shell logic into dedicated scripts. The new scripts are well-structured. I've provided a few suggestions to further improve them, focusing on robustness against edge cases (like missing git tags), correctness in logic (like counting commits instead of lines), and overall code clarity and efficiency by reducing repetition.

Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/build-binaries.sh
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh Outdated
@rabilrbl

Copy link
Copy Markdown
Collaborator Author

/gemini review

This comment was marked as off-topic.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request is a great step towards improving the maintainability of the release workflow by extracting complex shell logic into dedicated scripts. The new scripts are well-written and clear. My review includes a few suggestions to enhance them further. The most important feedback is about enabling parallel builds for Android targets to improve performance. Other comments focus on improving script robustness, efficiency, and code style in the bash scripts.

Comment thread scripts/build-binaries.sh
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh Outdated
rabilrbl and others added 4 commits August 18, 2025 21:41
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rabilrbl

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request is a great step towards improving the maintainability of your CI/CD workflows by extracting complex shell logic into dedicated scripts. The new scripts are well-structured. I've added a few suggestions to further enhance the scripts by reducing code duplication, improving readability, and optimizing performance. Overall, this is a solid refactoring.

Comment thread scripts/build-binaries.sh Outdated
Comment thread scripts/build-binaries.sh
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh Outdated
rabilrbl and others added 4 commits August 18, 2025 21:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rabilrbl

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request does a great job of refactoring the CI/CD workflows by moving complex shell logic into dedicated scripts. This significantly improves the maintainability and readability of the GitHub Actions YAML files.

My review focuses on the new shell scripts. I've identified a critical issue in build-binaries.sh regarding error handling for parallel builds, which could cause silent failures. In increment-version.sh, I've pointed out a potential bug in how feature commits are detected, which could lead to incorrect versioning, along with some suggestions for improving script clarity and performance.

Overall, these are excellent changes that make the automation more robust and easier to manage. Addressing the feedback will further enhance the reliability of your release process.

Comment thread scripts/build-binaries.sh Outdated
Comment thread scripts/increment-version.sh Outdated
Comment thread scripts/increment-version.sh
Comment thread scripts/increment-version.sh Outdated
rabilrbl and others added 2 commits August 18, 2025 22:16
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rabilrbl
rabilrbl merged commit 05c567f into develop Aug 18, 2025
11 checks passed
@rabilrbl
rabilrbl deleted the bugfix/sync-release-version-develop branch August 18, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants