diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3767cf8..ce859ff4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,7 +133,7 @@ jobs: npm install -g @semantic-release/changelog npm install -g @semantic-release/git npm install -g @semantic-release/github - npx semantic-release + npx semantic-release --repository-url https://github.com/vyfor/cord.nvim luarocks: name: LuaRocks Publish @@ -144,6 +144,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: client-server - uses: nvim-neorocks/luarocks-tag-release@v7 with: diff --git a/.releaserc.js b/.releaserc.js index 7a197e98..624f011b 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -13,8 +13,11 @@ module.exports = { [ "@semantic-release/release-notes-generator", { + "preset": "conventionalcommits", "writerOpts": { "headerPartial": "# {{#with context}}{{#if isServerUpdate}}⚙️ {{/if}}{{/with}}[{{currentTag}}]{{#if title}} {{title}}{{/if}}\n\n{{#if date}}_{{date}}_{{/if}}", + "commitPartial": "* {{subject}} ([{{hash}}]({{#if @root.repository}}{{@root.repository}}/commit/{{hash}}{{else}}{{@root.repoUrl}}/commit/{{hash}}{{/if}}))\n", + "mainTemplate": "{{> header}}\n\n{{#each commitGroups}}\n\n{{#if title}}\n### {{title}}\n\n{{/if}}{{#each commits}}{{> commit}}{{/each}}\n{{/each}}\n\n{{> footer}}", "transform": function (commit, context) { if (!context.context) context.context = {}; @@ -22,9 +25,17 @@ module.exports = { context.context.isServerUpdate = true; } + const shortHash = commit.hash.substring(0, 7); + return { - title: commit.subject, - body: commit.body || '' + type: commit.type, + scope: commit.scope, + subject: commit.subject || '', + hash: shortHash, + shortDesc: commit.subject || '', + body: commit.body || '', + footer: commit.footer || '', + notes: commit.notes || [] }; } }