feat: Workaround to generate new release version (#991) #3439
Workflow file for this run
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
# Workflow name | |
name: translations | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- 'dependabot/**' # 👈 Excludes dependabot branches | |
- 'main' # only run for non-main branches | |
jobs: | |
translate-files: | |
name: Translate localization files | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout repo' | |
uses: actions/checkout@v2 | |
- name: Install localization package | |
run: npm install -g i18n-auto-translation-msnyder | |
- name: Translate files | |
id: translate | |
uses: msnyder-msft/[email protected] | |
with: | |
provider: 'azure-official' | |
subscriptionKey: '${{ secrets.TRANSLATOR_SUBSCRIPTION_KEY }}' | |
location: 'westus2' | |
filePath: './src/Resources/Locales/en.json' | |
from: 'en' | |
to: 'cs,de,es,fr,hu,it,ja,ko,nl,pl,pt,pt-pt,ru,sv,tr,zh-Hans' | |
debug: false | |
- name: Get current branch name | |
id: branch_name | |
run: echo ::set-output name=current_branch::${GITHUB_REF#refs/*/} | |
- name: Commit changes | |
uses: devops-infra/action-commit-push@master | |
with: | |
github_token: '${{ secrets.GITHUB_TOKEN }}' | |
commit_prefix: '[Auto] ' | |
commit_message: 'Adding updated localization files' | |
force: false | |
target_branch: ${{steps.vars.branch_name.current_branch}} |