Skip to content

Commit 9c8a16a

Browse files
committed
Fix external releases
Add loaders to mc-publish Fix version parsing for Hangar. The trim command was added in jq 1.8.
1 parent b93900c commit 9c8a16a

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/external_release.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
files: ./OpenInv.jar
4444
game-versions: "${{ steps.parse_versions.outputs.PAPER_VERSIONS }}"
4545
game-version-filter: releases
46+
loaders: |
47+
spigot
48+
paper
49+
folia
4650
4751
modrinth_release:
4852
runs-on: ubuntu-latest
@@ -59,6 +63,10 @@ jobs:
5963
files: ./OpenInv.jar
6064
game-versions: "${{ steps.parse_versions.outputs.PAPER_VERSIONS }}"
6165
game-version-filter: releases
66+
loaders: |
67+
spigot
68+
paper
69+
folia
6270
6371
hangar_release:
6472
runs-on: ubuntu-latest
@@ -69,11 +77,14 @@ jobs:
6977
# Find line declaring Paper versions.
7078
raw=$(grep "\\*\\*Paper:\\*\\*" <<< "${{ github.event.release.body }}")
7179
# Trim Paper versions identifier prefix.
72-
raw=${raw/'**'Paper:'**'/}
80+
raw="${raw/'**'Paper:'**'/}"
81+
# Trim leading and trailing spaces.
82+
raw="${raw##[[:space:]]}"
83+
raw="${raw%%[[:space:]]}"
7384
7485
# Generate JSON for Hangar. GitHub Actions provides jq 1.7 in the 24.04 image.
75-
# Trim, then split on comma and optional spaces.
76-
hangar_versions=$(jq -nc --arg versions "$raw" '{"PAPER": $versions | trim | split(", *";null)}')
86+
# Split on comma and optional spaces.
87+
hangar_versions=$(jq -nc --arg versions "$raw" '{"PAPER": $versions | split(", *";null)}')
7788
7889
echo "$hangar_versions"
7990
echo "HANGAR_PAPER_VERSIONS=$hangar_versions" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)