-
Notifications
You must be signed in to change notification settings - Fork 18
74 lines (62 loc) · 1.97 KB
/
regenerate_localization_and_make_pr.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: regenerate_localization_and_make_pr
on:
push:
branches:
- 'weblate'
jobs:
unit-test:
name: Regenerate localization on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
# Checkout code and get packages.
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: develop
- name: Readm FVM config
uses: kuhnroyal/flutter-fvm-config-action@v1
- name: Set up Flutter.
uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- run: flutter --version
- name: Install Tools
run: |
./tools/install_tools.sh
- name: Bootstrap Workspace
run: flutter pub global run melos bootstrap
- name: Reset weblate branch
run: |
git fetch origin weblate:weblate
git reset --hard weblate
- name: Install intl_utils
run: flutter pub global activate intl_utils
- name: Generate dart localization code
run: flutter pub global run melos run generate:intl
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
# we need custom tokes to trigger other workflows on PR
token: ${{ secrets.REPO_SCOPED_TOKEN }}
branch: weblate-promotion
commit-message: Update report
signoff: true
delete-branch: false
title: '[Weblate] Update localization'
body: |
Update localization after weblate push
labels: |
localization
team-reviewers: |
owners
maintainers
draft: false
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"