-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: Add steps to update generated code as well.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,41 @@ on: | |
schedule: | ||
- cron: "0 10 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-translations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Fetch and merge from Weblate | ||
# The commit message is generated in Weblate; see https://hosted.weblate.org/addon/17163/ | ||
run: | | ||
git remote add weblate https://hosted.weblate.org/git/zulip/zulip-flutter/ | ||
git fetch weblate | ||
git merge --ff-only weblate/main | ||
- name: Clone Flutter SDK | ||
# TODO(#1204) reinstate shallow clone with --depth=1000 and its corresponding comment here | ||
run: | | ||
git clone -b main https://github.com/flutter/flutter ~/flutter | ||
TZ=UTC git --git-dir ~/flutter/.git log -1 --format='%h | %ci | %s' --date=iso8601-local | ||
echo ~/flutter/bin >> "$GITHUB_PATH" | ||
# The Flutter tool assumes the tip of tree is "origin/master" | ||
# (or "upstream/master"): | ||
# https://github.com/flutter/flutter/issues/160626 | ||
# TODO(upstream): make workaround unneeded | ||
git --git-dir ~/flutter/.git update-ref refs/remotes/origin/master origin/main | ||
- name: Update generated code | ||
run: | | ||
mkdir -p build | ||
tools/check l10n --fix | ||
git add lib/generated/l10n/ | ||
GIT_COMMITTER_NAME="Hosted Weblate" GIT_COMMITTER_EMAIL="[email protected]" \ | ||
git commit --amend -C HEAD | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
|