Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jun 1, 2024
1 parent 4a16c45 commit 68aa861
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 13,815 deletions.
102 changes: 50 additions & 52 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
name: Update resource pack

on:
schedule:
- cron: "30 16 * * *"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update language files
run: |
python source.py
- name: Update resource pack
run: |
python pack.py
- name: Commit
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "Update language files"

- name: Get Minecraft version
run: |
cat version.txt
echo "ver=$(<version.txt)" >> "$GITHUB_ENV"
- name: Release
uses: Kir-Antipov/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: "${{ env.ver }}"
files: unreadable_language_pack.zip
name: "${{ env.ver }}"
version: "${{ env.ver }}"
name: Update resource pack

on:
schedule:
- cron: "30 16 * * *"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update language files
run: git submodule foreach 'git pull origin master'

- name: Update resource pack
run: python pack.py

- name: Commit
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "Update language files"

- name: Get Minecraft version
run: |
cat version.txt
echo "ver=$(<version.txt)" >> "$GITHUB_ENV"
- name: Release
uses: Kir-Antipov/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: "${{ env.ver }}"
files: unreadable_language_pack.zip
name: "${{ env.ver }}"
version: "${{ env.ver }}"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "mc_lang"]
path = mc_lang
url = https://github.com/SkyEye-FAST/mc_lang
1 change: 1 addition & 0 deletions mc_lang
Submodule mc_lang added at cc001a
2 changes: 1 addition & 1 deletion pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def load_json(file: str, folder: str = "data") -> Ldata:

# 读取语言文件
data: Dict[str, Ldata] = {
lang_name: load_json(lang_name, "source") for lang_name in ["en_us", "zh_cn"]
lang_name: load_json(lang_name, "mc_lang/full") for lang_name in ["en_us", "zh_cn"]
}


Expand Down
Loading

0 comments on commit 68aa861

Please sign in to comment.