Rename workflow and update build steps for CheapDesign
This commit is contained in:
56
.github/workflows/build.yml
vendored
56
.github/workflows/build.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Release CheapMC
|
||||
name: Release CheapDesign
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -22,16 +22,60 @@ jobs:
|
||||
VERSION=$(cat version.txt | tr -d '\n')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: build CheapMC
|
||||
# -------- ZIP BUILD --------
|
||||
- name: Build Java texture packs
|
||||
run: |
|
||||
cd pack
|
||||
zip -r ../CheapMC-${{ steps.version.outputs.version }}.zip .
|
||||
zip -r ../CheapDesign-${{ steps.version.outputs.version }}.zip .
|
||||
cd ..
|
||||
cp CheapDesign-${{ steps.version.outputs.version }}.zip CheapMC-${{ steps.version.outputs.version }}.zip
|
||||
|
||||
- name: GitHub Release erstellen
|
||||
# -------- NODE SETUP --------
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install converter API
|
||||
run: |
|
||||
npm init -y
|
||||
npm install @modifiedcommand/convert-minecraft-java-texture-to-bedrock-api @geekcornernpm/convert-base-api
|
||||
|
||||
# -------- BEDROCK CONVERT --------
|
||||
- name: Convert CheapDesign to Bedrock MCPack
|
||||
run: |
|
||||
cat << 'EOF' > convert.mjs
|
||||
import { ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput } from "@geekcornernpm/convert-base-api";
|
||||
import { ConvertJavaTextureToBedrockApi } from "@modifiedcommand/convert-minecraft-java-texture-to-bedrock-api";
|
||||
|
||||
const inputZip = "CheapDesign-${{ steps.version.outputs.version }}.zip";
|
||||
const outputMcpack = "CheapDesign-${{ steps.version.outputs.version }}.mcpack";
|
||||
|
||||
try {
|
||||
const output = await new ConvertJavaTextureToBedrockApi(
|
||||
new Input(new LocalFileInputEntry(inputZip)),
|
||||
new LocalFileOutput(outputMcpack),
|
||||
new ConsoleLog()
|
||||
).convert();
|
||||
|
||||
console.log("Bedrock pack created:", output);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
EOF
|
||||
|
||||
node convert.mjs
|
||||
|
||||
# -------- GITHUB RELEASE --------
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.version }}
|
||||
name: CheapMC ${{ steps.version.outputs.version }}
|
||||
files: CheapMC-${{ steps.version.outputs.version }}.zip
|
||||
name: CheapDesign ${{ steps.version.outputs.version }}
|
||||
files: |
|
||||
CheapDesign-${{ steps.version.outputs.version }}.zip
|
||||
CheapMC-${{ steps.version.outputs.version }}.zip
|
||||
CheapDesign-${{ steps.version.outputs.version }}.mcpack
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user