1515 name : Get Latest Package Info
1616 runs-on : ubuntu-22.04
1717 outputs :
18+ jarFile : ${{ fromJson(steps.info.outputs.latestJson)[0].name }}
1819 version : ${{ steps.download-info.outputs.version }}
20+ mcVersion : ${{steps.minecraft.outputs.prop}}
21+ neoVersion : ${{steps.neoforge.outputs.prop}}
22+
1923 steps :
24+ - name : Set up JDK
25+ uses : actions/setup-java@v4
26+ with :
27+ distribution : temurin
28+ java-version : 21
29+
30+ - name : Setup Groovy
31+ uses : wtfjoke/setup-groovy@v2
32+ with :
33+ groovy-version : ' 4.x'
34+
2035 - name : Download Package Info
2136 id : download-info
2237 uses :
compactmods/[email protected] 4257 run : |
4358 mkdir release
4459 curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}"
45- mv compactmachines-nightly.json release/compactmachines-nightly.json
46-
47- - name : Add Artifact
48- uses : actions/upload-artifact@v4
49- with :
50- name : release
51- path : release
52-
53- vars :
54- name : Get Variables
55- runs-on : ubuntu-22.04
56- needs : [get-package-info]
57- outputs :
58- jarFile : ${{ fromJson(steps.info.outputs.latestJson)[0].name}}
59- mcVersion : ${{steps.minecraft.outputs.prop}}
60- neoVersion : ${{steps.neoforge.outputs.prop}}
61-
62- steps :
63- - name : Checkout
64- uses : actions/checkout@v4
65- with :
66- fetch-depth : 0
67-
68- - name : Grab JAR and Info
69- uses : actions/download-artifact@v4
70- with :
71- name : release
72- path : .
73-
74- - name : Read info into variable [latest]
75- id : info
76- run : echo "latestJson=$(cat compactmachines-nightly.json)" >> $GITHUB_OUTPUT
77-
78- - name : Set up JDK
79- uses : actions/setup-java@v4
80- with :
81- distribution : temurin
82- java-version : 21
83-
84- - name : Setup Groovy
85- uses : wtfjoke/setup-groovy@v2
86- with :
87- groovy-version : ' 4.x'
60+ mv compactmachines-nightly.json release/compactmachines-nightly.json
8861
8962 - name : MC Version
9063 id : minecraft
9467 id : neoforge
9568 run : groovy read-manifest.groovy ${{ fromJson(steps.info.outputs.latestJson)[0].name}} "NeoForge-Version" >> "$GITHUB_OUTPUT"
9669
70+ - name : Add Artifact
71+ uses : actions/upload-artifact@v4
72+ with :
73+ name : release
74+ path : release
75+
9776 announce :
9877 name : Discord Announcement
99- needs : [ vars, get-package-info ]
78+ needs : [ get-package-info ]
10079 runs-on : ubuntu-22.04
10180 steps :
10281 - name : Grab JAR and Info
@@ -105,18 +84,14 @@ jobs:
10584 name : release
10685 path : .
10786
108- - name : Read info into variable [latest]
109- id : info
110- run : echo "latestJson=$(cat compactmachines-nightly.json)" >> $GITHUB_OUTPUT
111-
11287 - name : Announce Release
11388 uses :
compactmods/[email protected] 11489 env :
11590 DISCORD_BOT_TOKEN : ${{ secrets.DISCORD_BOT_TOKEN }}
11691 with :
117- filename : ${{ needs.vars .outputs.jarFile }}
92+ filename : ${{ needs.get-package-info .outputs.jarFile }}
11893 channel : ${{ secrets.NIGHTLY_CHANNEL_ID }}
11994 modName : Compact Machines
12095 modVersion : ${{ needs.get-package-info.outputs.version }}
12196 thumbnail : https://media.forgecdn.net/avatars/10/602/635460270800375500.png
122- mcVersion : ${{ needs.vars .outputs.mcVersion }}
97+ mcVersion : ${{ needs.get-package-info .outputs.mcVersion }}
0 commit comments