Skip to content

Conversation

tuancoltech
Copy link
Member

@tuancoltech tuancoltech commented Mar 19, 2025

Update README.md: Add release guide

Summary by CodeRabbit

  • Documentation
    • Added a new section titled "How to release a new version?" in the README.md, providing a step-by-step guide for releasing a new version of the project.

Copy link

coderabbitai bot commented Mar 19, 2025

Walkthrough

The pull request introduces a new section titled "How to release a new version?" in the README.md file. This section provides a step-by-step guide for releasing a new version of the project, detailing the process of updating the versionCode and versionName in the utils/build.gradle file, triggering the Release task in GitHub Actions on the main branch, and drafting a new release on the GitHub releases page. There are no deletions or modifications to existing content.

Changes

File(s) Change Summary
README.md Added a "How to release a new version?" section with instructions for updating versionCode/versionName in utils/build.gradle, triggering the Release task in GitHub Actions, and drafting a GitHub release.

Possibly related PRs

  • Add versionName/versionCode for utils's build.gradle #2: The changes in the main PR, which focus on adding a section to the README.md about releasing a new version, are related to the modifications in the retrieved PR that involve updating the versionCode and versionName in the utils/build.gradle file, as both PRs address versioning aspects of the project.
  • Release 1.0.2 #5: The changes in the main PR provide instructions for updating the versionCode and versionName in the utils/build.gradle file, which directly relates to the versioning updates made in the retrieved PR.
  • Prepare release 1.0.4 #13: The changes in the main PR provide instructions for releasing a new version, which directly reference updating the versionCode and versionName in the same utils/build.gradle file that is modified in the retrieved PR, indicating a strong connection between the two.

Suggested reviewers

  • jo-elimu

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 0

🧹 Nitpick comments (1)
README.md (1)

42-44: Convert Bare URL to Markdown Link

Line 44 contains a bare URL (https://github.com/elimu-ai/common-utils/releases), which violates Markdown style guidelines (MD034). Converting this URL into a Markdown-formatted link will improve readability and maintain consistency with best practices. Consider the following diff:

-3. Draft a new Release in https://github.com/elimu-ai/common-utils/releases
+3. Draft a new Release in [GitHub Releases](https://github.com/elimu-ai/common-utils/releases)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7736d and bdc97f6.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

44-44: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (windows-latest, 17)
🔇 Additional comments (1)
README.md (1)

40-41: New Release Guide Section Added

The new section "How to release a new version?" is clear and concise, providing a straightforward step-by-step guide for the release process. This addition aligns well with the PR objectives.

@tuancoltech
Copy link
Member Author

@jo-elimu Can you please confirm if the release steps here are exactly the same as what you often do to release other apps/libraries?

@jo-elimu
Copy link
Member

Can you please confirm if the release steps here are exactly the same as what you often do to release other apps/libraries?

@tuancoltech If you were to do all the release steps manually, it would look something like this:

  1. Remove -SNAPSHOT from the version name. Commit changes.
  2. Create version tag.
  3. Bump version code and version name. Add -SNAPSHOT to version name. Commit changes.

@tuancoltech
Copy link
Member Author

tuancoltech commented Mar 19, 2025

Can you please confirm if the release steps here are exactly the same as what you often do to release other apps/libraries?

@tuancoltech If you were to do all the release steps manually, it would look something like this:

  1. Remove -SNAPSHOT from the version name. Commit changes.
  2. Create version tag.
  3. Bump version code and version name. Add -SNAPSHOT to version name. Commit changes.

@jo-elimu As per in https://github.com/elimu-ai/content-provider/blob/main/app/build.gradle, the work of adding -SNAPSHOT suffix is done automatically by releasePrepare.
However, in this specific project, which uses the same release tasks, the GIT push job doesn't seem to be successful all the times. It it worked, we could ignore step 3.

Anything you could think of as the reason for which releasePrepare's push job doesn't work?
Could it possibly be because I used my own git username/email in: https://github.com/elimu-ai/common-utils/blob/main/.github/workflows/gradle-release.yml ?

@jo-elimu jo-elimu requested a review from a team as a code owner March 19, 2025 10:35
@jo-elimu
Copy link
Member

jo-elimu commented Mar 19, 2025

Anything you could think of as the reason for which releasePrepare's push job doesn't work?
Could it possibly be because I used my own git username/email in: https://github.com/elimu-ai/common-utils/blob/main/.github/workflows/gradle-release.yml ?

@tuancoltech You mean this error here?: https://github.com/elimu-ai/common-utils/actions/runs/13941674979/job/39019598597

If you try to tag the same version number twice, that will cause an error. Could that be the reason? For example, if 1.0.2 has already been tagged, and the release tasks are run again for that same version number.

@tuancoltech
Copy link
Member Author

tuancoltech commented Mar 20, 2025

Anything you could think of as the reason for which releasePrepare's push job doesn't work?
Could it possibly be because I used my own git username/email in: https://github.com/elimu-ai/common-utils/blob/main/.github/workflows/gradle-release.yml ?

@tuancoltech You mean this error here?: https://github.com/elimu-ai/common-utils/actions/runs/13941674979/job/39019598597

If you try to tag the same version number twice, that will cause an error. Could that be the reason? For example, if 1.0.2 has already been tagged, and the release tasks are run again for that same version number.

@jo-elimu No.

The error I was referring to is related to push command in releasePerform task.

Screenshot 2025-03-20 at 10 07 25

Screenshot 2025-03-20 at 10 10 24

Even though there was no exception log, it seems push wasn't successful because I could not see the -SNAPSHOT suffix appended to versionName after the release, which is in theory, should be updated automatically in releasePrepare task, and pushed in releasePerform

Screenshot 2025-03-20 at 10 07 40

I was wondering if that's because I use my git user info when running those tasks.

Screenshot 2025-03-20 at 10 09 41

Reference: https://github.com/elimu-ai/common-utils/actions/runs/13941708067/job/39019703815

@jo-elimu
Copy link
Member

jo-elimu commented Mar 20, 2025

@tuancoltech This might have to do with a missing GitHub token. The account info@elimu.ai has an organization-level token set already. Can you try switching to that account instead?

@tuancoltech
Copy link
Member Author

@tuancoltech This might have to do with a missing GitHub token. The account info@elimu.ai has an organization level tomen set already. Can you try switching to that account instead?

Thanks. I'll try in next release.

Copy link

@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: 0

🧹 Nitpick comments (1)
README.md (1)

42-44: Step Instructions Clarity & Link Formatting Improvement
The bullet list provides a concise, step-by-step guide for the release process. However, note that step 3 uses a bare URL, which triggers a markdownlint warning (MD034). Consider converting it to a Markdown link (e.g., [GitHub Releases](https://github.com/elimu-ai/common-utils/releases)) for better readability and to adhere to markdown standards.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bdc97f6 and 671722f.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

44-44: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (windows-latest, 17)
🔇 Additional comments (1)
README.md (1)

40-41: Release Guide Section Heading is Clear
The new section heading “## How to release a new version?” is clearly defined and easy to locate in the README. This makes it straightforward for users to find the release instructions.

Copy link

@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: 0

🧹 Nitpick comments (1)
README.md (1)

40-44: New Release Guide Section: Improve URL Formatting & Clarify SNAPSHOT Note

The added "How to release a new version?" section clearly outlines the steps for releasing a new version. However, please consider the following improvements:

  • Bare URL in Step 3: In line 44, a bare URL is used. Markdown best practices suggest using a markdown-formatted link to improve readability and avoid markdownlint warnings (MD034). For example, replace
    Draft a new Release in https://github.com/elimu-ai/common-utils/releases
    
    with
    Draft a new Release in [GitHub Releases](https://github.com/elimu-ai/common-utils/releases)
    
  • Clarify the -SNAPSHOT Suffix Note: The instruction in step 1 advises not to remove the SNAPSHOT suffix, which might seem confusing given that in some projects the suffix is managed automatically (as noted in previous discussions). It would be beneficial to clarify if the suffix is auto-appended by the release task or if manual intervention is required.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 671722f and f21c421.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

44-44: Bare URL used
null

(MD034, no-bare-urls)

tuancoltech and others added 3 commits April 2, 2025 12:43
Co-authored-by: Jo G. <1451036+jo-elimu@users.noreply.github.com>
Copy link

@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: 0

🧹 Nitpick comments (1)
README.md (1)

44-44: Fix Bare URL Markdown Warning

The URL in step 3 is currently a bare URL, which triggers a markdown lint warning (MD034). Consider converting it to a proper markdown link. For example:

-3. Draft a new Release in https://github.com/elimu-ai/common-utils/releases
+3. Draft a new Release in [this link](https://github.com/elimu-ai/common-utils/releases)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f21c421 and 7fe0b72.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

44-44: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 17)
  • GitHub Check: build (windows-latest, 21)
🔇 Additional comments (1)
README.md (1)

40-45: Well-Structured Release Guide Addition

The new "How to release a new version?" section clearly outlines the required steps for releasing a new version. It provides a logical sequence: updating build configurations, triggering the release workflow, and drafting a new release. Please ensure that these steps remain synchronized with any automation in our CI/CD pipeline to avoid discrepancies.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Bare URL used
null

(MD034, no-bare-urls)

@tuancoltech tuancoltech merged commit ba5d9a6 into main Apr 2, 2025
6 checks passed
@tuancoltech tuancoltech deleted the update_readme branch April 2, 2025 05:51
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