feat(action): changelog/update - Update CHANGELOG.md with new version
- 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
Assessment
This issue has not been assessed yet.