Skip to content

Commit

Permalink
Fix CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
tier940 committed Feb 5, 2024
1 parent c4ea83b commit 9ea1082
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy_questbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ env:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
language: ['EN-US', 'ZH']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -56,11 +59,12 @@ jobs:
- name: Run Python
env:
DEEPL_AUTH_KEY: ${{ secrets.DEEPL_AUTH_KEY }}
TARGET_LANG_CODE: ${{ matrix.language }}
run: python ./buildtools/questbook/translate.py

- name: Archive Release
run: |
zip -r ./${{ env.FULL_NAME }}.zip ./ftbquests-tl/
zip -r ./${{ env.FULL_NAME }}-${{ matrix.language }}.zip ./ftbquests-tl-${{ matrix.language }}/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
Expand All @@ -70,4 +74,4 @@ jobs:
prerelease: false
generate_release_notes: true
files: |
./${{ env.FULL_NAME }}.zip
./${{ env.FULL_NAME }}-*.zip
4 changes: 2 additions & 2 deletions buildtools/questbook/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import os

source_path = "ftbquests"
target_path = "ftbquests-tl"
target_path = "ftbquests-tl-" + os.environ["TARGET_LANG_CODE"]

auth_key = os.environ["DEEPL_AUTH_KEY"]

# Language code can be known in https://www.deepl.com/docs-api/general/get-languages
target_lang_code = "EN-US"
target_lang_code = os.environ["TARGET_LANG_CODE"]

# In some area on this earth, you should set a proper api server site at first.
server_url = "https://api.deepl.com"
Expand Down
6 changes: 3 additions & 3 deletions resourcepack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
6. Run the instance and enjoy the game!

## Other translations
- CoreMod translations are available in the [repository](https://github.com/GTModpackTeam/GTExpert-Core)
- CustomMainMenu translations are available in the [repository](https://github.com/GTModpackTeam/GregTech-Expert-2/tree/main/overrides/resources)
- ModPack tooltip translations are available in the [repository](https://github.com/GTModpackTeam/GregTech-Expert-2/tree/main/overrides/resources)
- CoreMod translations are available in the [repository](https://github.com/GTModpackTeam/GTExpert-Core/tree/master/src/main/resources/assets/gtexpert/lang)
- CustomMainMenu translations are available in the [repository](https://github.com/GTModpackTeam/GregTech-Expert-2/tree/main/overrides/resources/custommainmenu/lang)
- ModPack tooltip translations are available in the [repository](https://github.com/GTModpackTeam/GregTech-Expert-2/tree/main/overrides/resources/modpack/lang)

0 comments on commit 9ea1082

Please sign in to comment.