forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create pull-translation-and-compile.yml
- Loading branch information
1 parent
b94ba58
commit 3f1b4a0
Showing
1 changed file
with
46 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Pull translations from Transifex" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pull-translations: | ||
if: github.repository == 'AnotherSeawhite/Cataclysm-DDA' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: install gettext tools | ||
run: sudo apt-get install gettext | ||
- name: "Install Transifex CLI" | ||
run: | | ||
curl -sL https://github.com/transifex/cli/releases/download/v1.6.4/tx-linux-amd64.tar.gz | sudo tar zxvf - -C /usr/bin tx | ||
- name: "Delete existing i18n branch" | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{ secrets.TX_PR_CREATOR }} | ||
script: | | ||
try { | ||
await github.rest.git.deleteRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "heads/i18n" | ||
}) | ||
} catch (error) { | ||
console.log(error) | ||
} | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Get current date" | ||
uses: josStorer/[email protected] | ||
id: current-date | ||
with: | ||
format: 'DD MMMM YYYY' | ||
- name: Compile translations (windows) | ||
run: | | ||
lang/compile_mo.sh all | ||
- name: "Upload Translation Artifact" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ready-to-use | ||
path: lang/mo | ||
compression-level: 0 | ||
overwrite: true |