Skip to content

feat: updated pack format to 1.21 #11

feat: updated pack format to 1.21

feat: updated pack format to 1.21 #11

Workflow file for this run

name: Build optimized resource pack
on:
push:
branches:
- main
workflow_dispatch:
jobs:
packsquash:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Download tombl
uses: robinraju/[email protected]
with:
repository: snyball/tombl
fileName: "*.tar.gz"
latest: true
- name: Install tombl
run: |
mkdir bin
tar -zxvf tombl-*.tar.gz -C bin/
readonly tombl=$(find bin/ -type f -executable -print -quit)
echo "$(dirname $tombl)" >> $GITHUB_PATH
- name: Prepare environments
id: info
run: |
eval "$(tombl -e name=name pack.toml)"
echo "name=$name" >> $GITHUB_OUTPUT
eval "$(tombl -e version=version pack.toml)"
echo "version=$version" >> $GITHUB_OUTPUT
sha=`echo $GITHUB_SHA | cut -c 1-7`
echo "sha=$sha" >> $GITHUB_OUTPUT
package=${name}-${version}-rev.${sha}
echo "package=$package" >> $GITHUB_OUTPUT
mkdir build
eval "$(tombl -e output=output_file_path packsquash.toml)"
echo "output=$output" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }}
path: src/
- name: Make Optimized Pack
if: startsWith(github.ref, 'refs/tags/v')
uses: ComunidadAylas/PackSquash-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
options: packsquash.toml
packsquash_version: latest
- name: Rename Optimized Pack
if: startsWith(github.ref, 'refs/tags/v')
run: mv ${{ steps.info.outputs.output }} "${{ steps.info.outputs.package }}.zip"
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
uses: Kir-Antipov/[email protected]
with:
modrinth-id: Srw5RQ6k
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 513425
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files-primary: ${{ steps.info.outputs.package }}.zip
name: ${{ steps.info.outputs.name }} v${{ steps.info.outputs.version }}
version: v${{ steps.info.outputs.version }}
version-type: release
changelog-file: CHANGELOG.md
game-versions: |
1.21
1.20.6
1.20.5
1.20.4
1.20.3
1.20.2
1.20.1
1.20
1.19.3
1.19.2
1.19.1
1.19
1.18.2
1.18.1
1.18
1.17.1
1.17
1.16.5
1.16.4
1.16.3
1.16.2
1.16.1
1.16
1.15.2
1.15.1
1.15
1.14.4
1.14.3
1.14.2
1.14.1
1.14
1.13.2
1.13.1
1.13
loaders: |
minecraft