Skip to content

Commit 894ef0a

Browse files
committed
Add 'all' option to auto updater
So can update all, not just one
1 parent e2fdcb0 commit 894ef0a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/Update.Unturned.Redist.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
default: 'client'
1212
type: choice
1313
options:
14+
- all
1415
- client
1516
- server
1617
- server-preview
@@ -38,7 +39,13 @@ jobs:
3839
id: set_variants
3940
run: |
4041
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
41-
echo "variants=[\"${INPUT_VARIANT}\"]" >> $GITHUB_OUTPUT
42+
if [ "$INPUT_VARIANT" = "all" ]; then
43+
all_variants=("client" "server" "server-preview" "client-preview" "server-preview-old" "client-preview-old")
44+
variants_json=$(printf '%s\n' "${all_variants[@]}" | jq -R . | jq -s -c .)
45+
echo "variants=$variants_json" >> $GITHUB_OUTPUT
46+
else
47+
echo "variants=[\"${INPUT_VARIANT}\"]" >> $GITHUB_OUTPUT
48+
fi
4249
else
4350
all_variants=("client" "server" "server-preview" "client-preview" "server-preview-old" "client-preview-old")
4451
variants_json=$(printf '%s\n' "${all_variants[@]}" | jq -R . | jq -s -c .)

0 commit comments

Comments
 (0)