Skip to content

Add actions for changelog workout#57

Merged
Nikolay1224 merged 17 commits intomainfrom
storage-add-changelog-work
Jan 29, 2026
Merged

Add actions for changelog workout#57
Nikolay1224 merged 17 commits intomainfrom
storage-add-changelog-work

Conversation

@duckhawk
Copy link
Member

@duckhawk duckhawk commented Jan 28, 2026

Add composite actions for release automation

Description

This PR adds two new composite actions to automate the release process for modules:

  1. translate-changelog - Automatically translates Russian changelog files to English and creates a PR
  2. merge-and-release - Merges a PR and creates a GitHub release with tag

Changes

1. translate-changelog Action

  • Automatically finds the latest Russian changelog file (by SemVer) in the CHANGELOG directory
  • Translates content to English while preserving formatting and indentation
  • Creates a PR from the current branch with the translated file
  • Only runs if the last commit contains changes in CHANGELOG/*.ru.yml files

Features:

  • Line-by-line translation preserving YAML structure and indentation
  • Uses deep-translator with Google Translate API
  • Automatically determines version from filename
  • Skips files that already have an English version

2. merge-and-release Action

  • Merges PR using squash merge strategy
  • Deletes branch after merge
  • Creates Git tag based on version extracted from PR title
  • Creates GitHub Release with content from English changelog file

Features:

  • Support for PAT (RELEASE_PAT) to trigger workflows via tag push
  • Automatic version extraction from PR title
  • Handles existing tags (skips if tag already exists)
  • Proper git credentials configuration for PAT usage

Usage

Usage examples have been added to .examples/:

  • translate-changelog.yml - Example workflow for translating changelog
  • merge-and-release.yml - Example workflow for merging and releasing

Technical Details

  • For merge-and-release to work correctly with PAT:

    • Configure RELEASE_PAT secret in the repository
    • Use persist-credentials: false in actions/checkout
    • PAT must have repo and workflow permissions
  • Translation preserves YAML structure and indentation by translating line-by-line

  • Both actions are composite actions and can be used in any module repository

Documentation Updates

  • Updated README.md with descriptions of new actions
  • Added usage examples in .examples/

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@duckhawk duckhawk marked this pull request as ready for review January 28, 2026 11:15
@duckhawk duckhawk requested a review from Nikolay1224 as a code owner January 28, 2026 11:15
@duckhawk duckhawk self-assigned this Jan 28, 2026
@Nikolay1224 Nikolay1224 merged commit 144ee9d into main Jan 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants