forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.55 KB
/
Copy pathci_lupdate.yml
File metadata and controls
50 lines (46 loc) · 1.55 KB
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: CI_Run_lupdate_to_tx
on:
workflow_dispatch:
inputs:
publish:
description: 'Publish to Transifex: on - publish'
required: false
default: 'off'
jobs:
lupdate:
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: "Configure workflow"
run: |
bash ./build/ci/tools/make_build_number.sh
BUILD_NUMBER=$(cat ./build.artifacts/env/build_number.env)
DO_PUBLISH='false'
if [ "${{ github.event.inputs.publish }}" == "on" ]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.TRANSIFEX_API_TOKEN }}" ]; then
echo "warning: not set TRANSIFEX_API_TOKEN, publish disabled"
DO_PUBLISH='false'
fi
fi
echo "DO_PUBLISH=$DO_PUBLISH" >> $GITHUB_ENV
echo "DO_PUBLISH: $DO_PUBLISH"
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
echo "BUILD_NUMBER: $BUILD_NUMBER"
- name: Setup environment
run: |
sudo bash ./build/ci/translation/qt_install.sh
- name: Run lupdate
run: |
sudo bash ./build/ci/translation/run_lupdate.sh
- name: Publish to Transifex
if: env.DO_PUBLISH == 'true'
run: |
sudo bash ./build/ci/translation/tx_install.sh -t ${{ secrets.TRANSIFEX_API_TOKEN }} -s linux
sudo bash ./build/ci/translation/tx_push.sh
- name: Upload artifacts on GitHub
uses: actions/upload-artifact@v3
with:
name: MuseScore_tsfiles_${{ env.BUILD_NUMBER }}
path: ./share/locale