forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.59 KB
/
translate_lupdate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'Translate: lupdate source TS in repo'
on:
workflow_dispatch:
inputs:
cleanup_obsolete:
description: "Clean up obsolete strings"
required: true
type: boolean
default: false
schedule:
- cron: "0 12 * * Sun"
jobs:
lupdate:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository == 'musescore/MuseScore'
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Configure workflow
run: |
LUPDATE_ARGS=''
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.cleanup_obsolete }}" == "true" ]]; then
LUPDATE_ARGS='-no-obsolete'
fi
echo "LUPDATE_ARGS=$LUPDATE_ARGS" | tee -a $GITHUB_ENV
- name: Setup environment
run: |
bash ./buildscripts/ci/translation/qt_install.sh
- name: Run lupdate
run: |
bash ./buildscripts/ci/translation/run_lupdate.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit-message: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
branch: "ci_lupdate${{github.ref_name && format('_{0}', github.ref_name) || ''}}"
add-paths: share/locale/*
title: "Update in-repo translation source files"
body: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
labels: strings
reviewers: cbjeukendrup