aRustyDev / aRustyDev/gh

feat(action): changelog/update - Update CHANGELOG.md with new version

Open
#38 0 comments 0 reactions 1 assignee Claimed by @aRustyDev View on GitHub
enhancement new-action
Dominant language
Shell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Parent Epic
Part of #22 (Atomic Release Pipeline Actions)

## Priority
P1 - Release support for W5/W6

## Description

Create a composite action that updates a CHANGELOG.md file with a new version section.

## Inputs

| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `changelog-path` | Yes | - | Path to CHANGELOG.md |
| `version` | Yes | - | Version number |
| `content` | Yes | - | Changelog content to insert |
| `date` | No | `today` | Release date (YYYY-MM-DD) |
| `create-if-missing` | No | `true` | Create file if it doesn't exist |

## Outputs

| Output | Description |
|--------|-------------|
| `updated` | "true" if file was modified |
| `created` | "true" if file was created |

## Usage Example

```yaml
- uses: arustydev/gha/actions/changelog/generate@v1
id: gen

- uses: arustydev/gha/actions/changelog/update@v1
with:
changelog-path: charts/my-chart/CHANGELOG.md
version: "1.3.0"
content: ${{ steps.gen.outputs.changelog }}
```

## Implementation Notes

- Inserts new version section after header
- Creates Keep-a-Changelog format file if missing
- Preserves existing content
- Handles [Unreleased] section if present

## Source Reference

`helm-charts/.github/scripts/version-bump.sh`:
- `generate_changelog()` - file creation and update logic

## Related

- #35 - changelog/extract-version (complementary)
- #36 - changelog/generate (complementary)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.