Skip to content

feat: updated mc-publish action #18

feat: updated mc-publish action

feat: updated mc-publish action #18

Workflow file for this run

name: Build optimized resource pack
on:
push:
branches:
- main
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/