Skip to content

Update locale.json (#313) #38

Update locale.json (#313)

Update locale.json (#313) #38

Workflow file for this run

name: Localisation
on:
push:
branches: ["v*"]
paths: ["resources/locale.json"]
workflow_dispatch:
jobs:
rebuild-locale:
name: Rebuild Localisation
runs-on: windows-latest
steps:
- name: Checkout Peacock
uses: actions/checkout@v3
with:
token: ${{ secrets.PEACOCKBOT_TOKEN }}
path: "./Peacock"
- name: Checkout Peacock Strings
uses: actions/checkout@v3
with:
token: ${{ secrets.PEACOCKBOT_TOKEN }}
repository: thepeacockproject/peacock-strings
path: "./PeacockStrings"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: "./Peacock/.nvmrc"
cache: "yarn"
cache-dependency-path: "./Peacock/yarn.lock"
- name: Install Packages
run: |
cd Peacock
yarn install --immutable
#- name: Download ResourceLib
# uses: robinraju/release-downloader@v1.7
# with:
# repository: "OrfeasZ/ZHMTools"
# latest: true
# fileName: "ResourceLib-win-x64.zip"
# out-file-path: "Peacock/resources"
- name: Download RPKG-CLI
id: rpkgcli
uses: vcup/release-downloader@v1.7
with:
repository: "glacier-modding/RPKG-Tool"
latest: true
fileName: "rpkg_*-cli.zip"
out-file-path: "Peacock/resources"
- name: Download HMLanguageTools
id: hmlt
uses: vcup/release-downloader@v1.7
with:
repository: "AnthonyFuller/TonyTools"
latest: true
fileName: "TonyTools.zip"
out-file-path: "Peacock/resources"
- name: Unzip dependencies
run: |
cd Peacock/resources
7z x ${{ steps.rpkgcli.outputs.downloaded_file_0 }}
7z x ${{ steps.hmlt.outputs.downloaded_file_0 }}
- name: Rebuild Locale Packages
run: |
cd Peacock
yarn rebuild-locale
- name: Push updated RPKG files
uses: EndBug/add-and-commit@v9
with:
cwd: "./Peacock"
add: |
resources/dynamic_resources_h2.rpkg
resources/dynamic_resources_h3.rpkg
author_name: PeacockBot
author_email: admin@thepeacockproject.org
message: "[skip ci] Update locale packages"
- name: Copy peacockstrings.locr.json
run: |
copy ./Peacock/resources/peacockstrings.locr.json ./PeacockStrings/content/chunk0/peacockstrings.locr.json
- name: Push updated Peacock LOCR
uses: EndBug/add-and-commit@v9
with:
cwd: "./PeacockStrings"
add: content/chunk0/peacockstrings.locr.json
author_name: PeacockBot
author_email: admin@thepeacockproject.org
message: "enhancement: update strings"