Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
2 changes: 1 addition & 1 deletion lua/shelltime/heartbeat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local lang = require('shelltime.utils.language')
local M = {}

-- Plugin version
local PLUGIN_VERSION = '0.1.0'
local PLUGIN_VERSION = '0.0.1' -- x-release-please-version

-- Pending heartbeats queue
local pending_heartbeats = {}
Expand Down
22 changes: 22 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"changelog-sections": [
{ "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" }
Comment on lines +9 to +15
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" }

],
"extra-files": [
"lua/shelltime/heartbeat.lua"
]
Comment on lines +17 to +19
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"
        }
      ]

}
}
}