i18n: complete Russian translations and preserve release notes on workflow build

This commit is contained in:
Dushnilin
2026-09-07 11:49:57 +03:00
parent 06abdd984b
commit 5710ab6127
6 changed files with 5651 additions and 4490 deletions
+33 -7
View File
@@ -87,6 +87,35 @@ jobs:
name: release-files-${{ needs.preparation.outputs.version }}
path: ./filtered-bin/release
- name: Prepare release notes
id: prepare_notes
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.event_name == 'push' && github.ref_name || needs.preparation.outputs.version }}
COMMIT_SHA: ${{ needs.preparation.outputs.commitish }}
WORKFLOW_NOTES: ${{ github.event_name == 'workflow_dispatch' && inputs.release_notes || '' }}
run: |
EXISTING_BODY=""
if gh release view "$TAG_NAME" >/dev/null 2>&1; then
EXISTING_BODY="$(gh release view "$TAG_NAME" --json body -q .body 2>/dev/null || true)"
fi
TRIMMED="$(printf '%s' "$EXISTING_BODY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
if [ -n "$TRIMMED" ] && ! printf '%s\n' "$TRIMMED" | grep -Eq '^Commit:[[:space:]]*[0-9a-fA-F]+$'; then
echo "Existing release notes found for $TAG_NAME. Preserving them."
printf '%s\n' "$EXISTING_BODY" > ./release_notes.md
echo "generate_notes=false" >> "$GITHUB_OUTPUT"
elif [ -n "$WORKFLOW_NOTES" ]; then
echo "Using workflow_dispatch release notes."
printf 'Commit: %s\n\n%s\n' "$COMMIT_SHA" "$WORKFLOW_NOTES" > ./release_notes.md
echo "generate_notes=false" >> "$GITHUB_OUTPUT"
else
echo "No existing release notes found. Using commit placeholder."
printf 'Commit: %s\n' "$COMMIT_SHA" > ./release_notes.md
echo "generate_notes=true" >> "$GITHUB_OUTPUT"
fi
- name: Release on tag push
if: ${{ github.event_name == 'push' }}
uses: softprops/action-gh-release@v2.4.0
@@ -95,13 +124,12 @@ jobs:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
target_commitish: ${{ needs.preparation.outputs.commitish }}
generate_release_notes: true
generate_release_notes: ${{ steps.prepare_notes.outputs.generate_notes == 'true' }}
draft: false
prerelease: false
make_latest: true
overwrite_files: true
body: |
Commit: ${{ needs.preparation.outputs.commitish }}
body_path: ./release_notes.md
- name: Release on workflow dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
@@ -111,12 +139,10 @@ jobs:
tag_name: ${{ needs.preparation.outputs.version }}
name: ${{ needs.preparation.outputs.version }}
target_commitish: ${{ needs.preparation.outputs.commitish }}
generate_release_notes: true
generate_release_notes: ${{ steps.prepare_notes.outputs.generate_notes == 'true' }}
draft: false
prerelease: false
make_latest: true
overwrite_files: true
body: |
Commit: ${{ needs.preparation.outputs.commitish }}
${{ inputs.release_notes }}
body_path: ./release_notes.md