新增snbt 转 json 工具 #2
Workflow file for this run
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
name: Build snbt to json and upload | |
on: | |
push: | |
paths: | |
- 'snbt2json/**' | |
workflow_dispatch: | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies (Windows) | |
run: | | |
pip install pyinstaller | |
pip install -r snbt2json/requirements.txt | |
- name: Build with PyInstaller (Windows) | |
run: | | |
python -m PyInstaller -F -n snbt-to-json-Windows snbt2json/main.py | |
- name: Upload (Windows) | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/snbt-to-json-Windows.exe | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies (macOS) | |
run: | | |
pip install pyinstaller | |
pip install -r snbt2json/requirements.txt | |
- name: Build with PyInstaller (macOS) | |
run: | | |
python -m PyInstaller -F -n snbt-to-json-macOS snbt2json/main.py | |
- name: Upload (macOS) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: snbt-to-json-macOS | |
path: dist/snbt-to-json-macOS | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies (Linux) | |
run: | | |
pip install pyinstaller | |
pip install -r snbt2json/requirements.txt | |
- name: Build with PyInstaller (Linux) | |
run: | | |
python -m PyInstaller -F -n snbt-to-json-Linux snbt2json/main.py | |
- name: Upload (Linux) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: snbt-to-json-Linux | |
path: dist/snbt-to-json-Linux |