Skip to content

ci(release): add release-please for automated releases#6

Merged
AnnatarHe merged 1 commit intomainfrom
ci/add-release-please
Dec 28, 2025
Merged

ci(release): add release-please for automated releases#6
AnnatarHe merged 1 commit intomainfrom
ci/add-release-please

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

Summary

  • Add release-please GitHub Action workflow for automated releases
  • Configure release-please with simple release type for Lua/Neovim plugin
  • Set initial version to 0.0.1
  • Add version annotation to heartbeat.lua for automatic version updates

Changes

  • .github/workflows/release.yml - Release workflow triggered on push to main
  • release-please-config.json - Configuration with changelog sections
  • .release-please-manifest.json - Version tracking manifest
  • lua/shelltime/heartbeat.lua - Added x-release-please-version annotation

How it works

  1. Push conventional commits to main
  2. Release-please creates/updates a Release PR with changelog
  3. Merge the Release PR → GitHub Release with tag is created

🤖 Generated with Claude Code

- Add release-please-config.json with simple release type
- Add .release-please-manifest.json starting at v0.0.1
- Add GitHub Actions workflow for release automation
- Update heartbeat.lua with x-release-please-version annotation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @AnnatarHe, 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 integrates "release-please" to establish an automated release workflow for the project. By leveraging conventional commits, this setup will automatically manage version bumps, generate comprehensive changelogs, and create GitHub releases, significantly streamlining the release process and ensuring consistency.

Highlights

  • Automated Releases: Implemented the "release-please" GitHub Action to automate the creation of releases and changelogs based on conventional commits.
  • Release Configuration: Configured "release-please" with a "simple" release type, suitable for Lua/Neovim plugins, and defined custom changelog sections.
  • Initial Versioning: Set the initial project version to "0.0.1" and added a version annotation to "lua/shelltime/heartbeat.lua" for automatic updates.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yml
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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.

@AnnatarHe AnnatarHe merged commit eaa6746 into main Dec 28, 2025
3 checks passed
@AnnatarHe AnnatarHe deleted the ci/add-release-please branch December 28, 2025 15:54
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude
Copy link
Copy Markdown

claude bot commented Dec 28, 2025

Code Review: Release Automation Setup

Overall, this is a well-structured PR that adds automated release management using release-please. The implementation is clean and follows good practices. Here are my findings:

✅ Strengths

  1. Proper Workflow Configuration: The GitHub Actions workflow is minimal and correct, with appropriate permissions (contents: write, pull-requests: write)
  2. Conventional Commits Alignment: The changelog sections match the project's existing Conventional Commits conventions documented in CLAUDE.md
  3. Version Annotation: Correctly uses x-release-please-version comment in heartbeat.lua:11 for automatic version bumping
  4. Semantic Versioning: Starting at 0.0.1 with bump-minor-pre-major and bump-patch-for-minor-pre-major is appropriate for a pre-1.0 project

🔍 Issues & Recommendations

1. Version Downgrade (Breaking Change)

  • Issue: Version changed from 0.1.00.0.1 in heartbeat.lua:11
  • Impact: This is a downgrade that could confuse users or break version-dependent logic
  • Recommendation:
    • If 0.1.0 was never formally released, 0.0.1 is fine
    • If 0.1.0 exists in the wild, use that as the starting version in .release-please-manifest.json
    • Consider checking git tags or clarifying the version history

2. Missing Version Sources

  • Issue: The PLUGIN_VERSION constant is only in heartbeat.lua, but there's no centralized version file
  • Recommendation: For Neovim plugins, consider also tracking version in:
    • A dedicated VERSION file (industry standard)
    • Plugin metadata if you plan to submit to package managers (vim-plug, packer, lazy.nvim registries)
    • Add these to extra-files in release-please-config.json if created

3. Missing Changelog Section

  • Issue: Config includes "chore" in changelog but missing "ci" type (this PR itself is ci(release))
  • Recommendation: Add to changelog-sections:
{ "type": "ci", "section": "CI/CD" }

4. Workflow Trigger Consideration

  • Observation: Workflow runs on every push to main
  • Impact: Creates release PRs frequently, even for non-release-worthy changes
  • Suggestion: This is standard for release-please, but document in README that:
    • Release PRs are auto-created but don't publish until merged
    • Maintainers control release timing by merging the Release PR

5. Security: Token Permissions

  • Status: ✅ Correctly uses minimal permissions
  • Note: Uses default GITHUB_TOKEN, which is appropriate (no need for PAT)

📋 Testing Recommendations

Since this is CI/CD infrastructure (not testable via unit tests), verify:

  1. Manual Validation:

    • After merging, verify release-please creates a Release PR
    • Check that the Release PR correctly bumps version in heartbeat.lua
    • Verify changelog generation follows expected format
    • Confirm that merging the Release PR creates a GitHub release with tag
  2. Version Verification:

    # After release, verify plugin reports correct version
    :lua print(require('shelltime.heartbeat').PLUGIN_VERSION)

🏗️ Architecture & Code Quality

  • Consistency: ✅ Follows project conventions (JSON formatting, file organization)
  • Documentation: ⚠️ Consider updating README.md to document the release process
  • Dependencies: ✅ Uses stable googleapis/release-please-action@v4

🎯 Minor Nits

  1. Schema Reference: The $schema field in release-please-config.json is good for IDE validation
  2. File Formatting: JSON files are properly formatted and valid
  3. Workflow Naming: "Release" is clear and descriptive

📝 Suggested Follow-ups (not blocking)

  • Add release documentation to README.md explaining:
    • How releases are triggered
    • Version bumping rules (conventional commits)
    • How to manually trigger a release
  • Consider adding release notes template (.github/release.yml)
  • Tag the initial 0.0.1 release manually if this is the first release

Final Verdict

Approve with Minor Suggestions

The implementation is solid and production-ready. The only blocking concern is verifying whether the version downgrade from 0.1.0 to 0.0.1 is intentional. Otherwise, this is a clean addition that will streamline the release process.


Review performed by Claude Code following CLAUDE.md conventions

Copy link
Copy Markdown

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

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 sets up release-please for automated releases by adding the necessary configuration files. The changes correctly configure a simple release type, set the initial version, and mark the version string in the Lua code for updates.

However, there is a critical omission: the GitHub Action workflow file (.github/workflows/release.yml), which is mentioned in the PR description, is missing from the changes. Without this file, release-please will not run, and no automated releases will be created. Please add the workflow file to this pull request.

I've also added a couple of suggestions to the release-please-config.json to make the configuration more robust and the generated changelogs more comprehensive.

Comment on lines +9 to +15
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "refactor", "section": "Code Refactoring" },
{ "type": "docs", "section": "Documentation" },
{ "type": "test", "section": "Tests" },
{ "type": "chore", "section": "Miscellaneous" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The changelog-sections list is missing some common conventional commit types like build, ci, style, and revert. Including them will create a more comprehensive and organized changelog. The current PR, for example, has a ci type and it would be good to have it reflected in its own section in the changelog.

        { "type": "feat", "section": "Features" },
        { "type": "fix", "section": "Bug Fixes" },
        { "type": "perf", "section": "Performance Improvements" },
        { "type": "refactor", "section": "Code Refactoring" },
        { "type": "revert", "section": "Reverts" },
        { "type": "docs", "section": "Documentation" },
        { "type": "style", "section": "Styles" },
        { "type": "test", "section": "Tests" },
        { "type": "build", "section": "Build System" },
        { "type": "ci", "section": "Continuous Integration" },
        { "type": "chore", "section": "Miscellaneous" }

Comment on lines +17 to +19
"extra-files": [
"lua/shelltime/heartbeat.lua"
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While using just the file path in extra-files works with the x-release-please-version comment, it's more robust and self-documenting to explicitly define how the version string should be updated. Using a regular expression makes the configuration clearer and less prone to accidental changes.

      "extra-files": [
        {
          "type": "re",
          "path": "lua/shelltime/heartbeat.lua",
          "pattern": "local PLUGIN_VERSION = '(?<version>.*)' -- x-release-please-version"
        }
      ]

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