Skip to content

Commit 6c33f25

Browse files
committed
refactor(release-changelog): replace jx-changelog with requarks/changelog-action
Remove the jx-changelog Docker-based changelog generation, which requires a Kubernetes environment, and replace it with requarks/changelog-action. Update promote workflow inputs to use the changelog- prefix with changelog-token, changelog-from-tag, changelog-to-tag, changelog-exclude-types, and changelog-file-path. Remove changelog-output-markdown and changelog-exclude-regexp inputs. Tag defaults are derived from release-version outputs.
1 parent b0944d3 commit 6c33f25

2 files changed

Lines changed: 27 additions & 192 deletions

File tree

.github/workflows/promote.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,27 @@ on:
130130
required: false
131131
type: boolean
132132
default: false
133-
changelog-output-markdown:
134-
description: 'Write the changelog output to this file (release-changelog action)'
133+
changelog-token:
134+
description: 'GitHub token for changelog generation (defaults to current GitHub token)'
135135
required: false
136136
type: string
137-
changelog-exclude-regexp:
138-
description: 'Regexp for excluding commits from the changelog (release-changelog action)'
137+
changelog-from-tag:
138+
description: 'Tag to start changelog from (defaults to previous version from release-version)'
139139
required: false
140140
type: string
141+
changelog-to-tag:
142+
description: 'Tag to end changelog at (defaults to version from release-version)'
143+
required: false
144+
type: string
145+
changelog-exclude-types:
146+
description: 'Comma-separated list of commit types to exclude from the changelog'
147+
required: false
148+
type: string
149+
changelog-file-path:
150+
description: 'Path to the changelog file'
151+
required: false
152+
type: string
153+
default: 'CHANGELOG.md'
141154
release-publish-enable:
142155
description: 'Create or update a GitHub release after the git push. Requires changelog-enabled to be true.'
143156
required: false
@@ -160,7 +173,7 @@ jobs:
160173
outputs:
161174
version: ${{ steps.release_version.outputs.version }}
162175
commit-sha: ${{ steps.determine_sha.outputs.sha }}
163-
changelog: ${{ steps.release_changelog.outputs.changelog }}
176+
changelog: ${{ steps.release_changelog.outputs.changes }}
164177
steps:
165178
- name: validate inputs
166179
if: inputs.release-publish-enable && !inputs.changelog-enabled
@@ -192,7 +205,7 @@ jobs:
192205
193206
- id: release_version
194207
name: next release version
195-
uses: getdevopspro/github-actions/release-version@v7.0.5
208+
uses: getdevopspro/github-actions/release-version@v7.0.6-prerelease
196209
with:
197210
version-previous: ${{ inputs.version-previous }}
198211
version-next: ${{ inputs.version-next }}
@@ -231,19 +244,21 @@ jobs:
231244
- name: release changelog
232245
id: release_changelog
233246
if: inputs.changelog-enabled
234-
uses: getdevopspro/github-actions/release-changelog@v7.0.6-prerelease
247+
uses: requarks/changelog-action@v1
235248
with:
236-
version: ${{ steps.release_version.outputs.version }}
237-
output-markdown: ${{ inputs.changelog-output-markdown }}
238-
exclude-regexp: ${{ inputs.changelog-exclude-regexp }}
249+
token: ${{ inputs.changelog-token != '' && inputs.changelog-token || github.token }}
250+
fromTag: ${{ inputs.changelog-from-tag != '' && inputs.changelog-from-tag || steps.determine_sha.outputs.sha }}
251+
toTag: ${{ inputs.changelog-to-tag != '' && inputs.changelog-to-tag || steps.release_version.outputs.previous-version }}
252+
excludeTypes: ${{ inputs.changelog-exclude-types }}
253+
changelogFilePath: ${{ inputs.changelog-file-path }}
239254

240255
- name: resolve changelog git-add-files
241256
id: resolve_changelog_git_add_files
242257
if: inputs.changelog-enabled
243258
shell: bash
244259
run: |
245260
set -euo pipefail
246-
CHANGELOG_FILE="${{ inputs.changelog-output-markdown }}"
261+
CHANGELOG_FILE="${{ inputs.changelog-file-path }}"
247262
CHANGELOG_FILE="${CHANGELOG_FILE:-CHANGELOG.md}"
248263
FILES="${{ inputs.git-add-files }}"
249264
case " ${FILES} " in
@@ -267,5 +282,5 @@ jobs:
267282
uses: getdevopspro/github-actions/release-publish@v7.0.6-prerelease
268283
with:
269284
version: ${{ steps.release_version.outputs.version }}
270-
changelog: ${{ steps.release_changelog.outputs.changelog }}
285+
changelog: ${{ steps.release_changelog.outputs.changes }}
271286
draft: ${{ inputs.release-publish-draft }}

release-changelog/action.yml

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)