Add build-local render and release workflows
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: Build renameable item readme
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "21"
|
||||
|
||||
- name: Resolve latest Minecraft release
|
||||
run: |
|
||||
mkdir -p build
|
||||
python build/scripts/resolve_latest_minecraft_release.py > build/minecraft-version.txt
|
||||
|
||||
- name: Read latest Minecraft release
|
||||
id: minecraft_version
|
||||
shell: bash
|
||||
run: |
|
||||
release=$(head -n 1 build/minecraft-version.txt)
|
||||
echo "release=$release" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build readme
|
||||
run: python build/scripts/build_readme.py --pack-root resourcepack --output-dir build
|
||||
|
||||
- name: Render model previews
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ steps.minecraft_version.outputs.release }}
|
||||
RENDER_MANIFEST: ${{ github.workspace }}/build/renameable-items.json
|
||||
RENDER_OUTPUT_DIR: ${{ github.workspace }}/build
|
||||
RENDER_PACK_ROOT: ${{ github.workspace }}/resourcepack
|
||||
run: python build/scripts/render_client_items.py --manifest build/renameable-items.json --pack-root resourcepack --output-dir build
|
||||
|
||||
- name: Publish generated catalog artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: renameable-item-catalog
|
||||
path: |
|
||||
build
|
||||
README.md
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Package resourcepack release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Package resourcepack and create release
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||
GITEA_REPOSITORY: ${{ github.repository }}
|
||||
run: python build/scripts/publish_resourcepack_release.py --resourcepack-root resourcepack --archive-path build/resourcepack.zip --tag ${{ github.ref_name }}
|
||||
Reference in New Issue
Block a user