forked from gemidyne/microtf2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport github action updates & update translations.tsutproj to new …
…schema
- Loading branch information
Showing
4 changed files
with
107 additions
and
55 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
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Translations" | ||
|
||
on: | ||
push: | ||
branches: [ dev, master ] | ||
paths: [ 'src/translations/**' ] | ||
pull_request: | ||
paths: [ 'src/translations/**' ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
export: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set environment variables | ||
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Install Tsukuru CLI | ||
run: dotnet tool install -g tsukuru | ||
|
||
- name: Validate translation project | ||
run: tsukuru validate-translation -f translations.tsutproj | ||
working-directory: src/translations | ||
|
||
- name: Export SM translations | ||
run: tsukuru export-translations -f translations.tsutproj | ||
working-directory: src/translations | ||
|
||
- name: Check for modified files | ||
id: git-pending | ||
run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi) | ||
|
||
- name: Push changes | ||
if: steps.git-pending.outputs.modified == 'true' | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add -A | ||
git commit -m '[automated] export latest translations from project' | ||
git push | ||
Oops, something went wrong.