-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
48 lines (44 loc) · 1.38 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Minecraft package world
author: Aksiome
description: Github action to automatically prepare a minecraft java world for release.
branding:
icon: package
color: purple
inputs:
source:
description: The world directory to compress
required: true
target:
description: The target zip file
required: true
config:
description: The mcwpack config file
required: true
default: mcwpack.yaml
version:
description: The version of mcwpack to install
required: true
default: latest
outputs:
archive:
value: ${{ steps.mcwpack.outputs.archive }}
description: Path to the archive containing the compressed world
runs:
using: composite
steps:
- id: mcwpack
shell: bash
env:
MCWPACK_SOURCE: ${{ inputs.source }}
MCWPACK_TARGET: ${{ inputs.target }}
MCWPACK_CONFIG: ${{ inputs.config }}
MCWPACK_VERSION: ${{ inputs.version }}
run: |
mkdir ~/.mcwpack
curl -LJOsS https://github.com/aksiome/mcwpack/releases/${MCWPACK_VERSION}/download/mcwpack-linux.tar.gz
tar -xzf mcwpack-linux.tar.gz -C ~/.mcwpack
if [[ $MCWPACK_TARGET != *.zip ]]; then
export MCWPACK_TARGET="${MCWPACK_TARGET}.zip"
fi
~/.mcwpack/mcwpack $MCWPACK_SOURCE --colors --noprompt -c $MCWPACK_CONFIG -z $MCWPACK_TARGET
echo "archive=$(echo $MCWPACK_TARGET)" >> $GITHUB_OUTPUT