Skip to content

Commit

Permalink
Create pull-translation-and-compile.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherSeawhite authored Apr 6, 2024
1 parent b94ba58 commit 3f1b4a0
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pull-translation-and-compile.yml
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

0 comments on commit 3f1b4a0

Please sign in to comment.