|
11 | 11 | required: true |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - get-package-info: |
15 | | - name: Get Latest Package Info |
16 | | - runs-on: ubuntu-22.04 |
17 | | - outputs: |
18 | | - version: ${{ steps.download-info.outputs.version }} |
19 | | - jarFile: ${{ fromJson(steps.info.outputs.latestJson)[0].name }} |
20 | | - mcVersion: ${{steps.minecraft.outputs.prop}} |
21 | | - neoVersion: ${{steps.neoforge.outputs.prop}} |
22 | | - |
23 | | - steps: |
24 | | - - name: Checkout |
25 | | - uses: actions/checkout@v4 |
26 | | - |
27 | | - - name: Set up JDK |
28 | | - uses: actions/setup-java@v4 |
29 | | - with: |
30 | | - distribution: temurin |
31 | | - java-version: 21 |
32 | | - |
33 | | - - name: Setup Groovy |
34 | | - uses: wtfjoke/setup-groovy@v2 |
35 | | - with: |
36 | | - groovy-version: '4.x' |
37 | | - |
38 | | - - name: Download Package Info |
39 | | - id: download-info |
40 | | - uses: compactmods/dl-package-info@1.0.3 |
41 | | - env: |
42 | | - GQL_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
43 | | - with: |
44 | | - owner: compactmods |
45 | | - repo: compactmachines |
46 | | - group: dev.compactmods.compactmachines.compactmachines-neoforge |
47 | | - filter: "^compactmachines-neoforge-(?:[\\d\\.]+).jar$" |
48 | | - outputFile: compactmachines.json |
49 | | - |
50 | | - - name: Debug output |
51 | | - run: | |
52 | | - echo "Version: ${{ steps.download-info.outputs.version }}" |
53 | | - cat compactmachines.json |
54 | | -
|
55 | | - - name: Read info into variable [latest] |
56 | | - id: info |
57 | | - run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT |
58 | | - |
59 | | - - name: Download JAR and prepare artifacts |
60 | | - run: | |
61 | | - mkdir release |
62 | | - curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name }}" |
63 | | - mv compactmachines.json release/compactmachines.json |
64 | | -
|
65 | | - - name: MC Version |
66 | | - id: minecraft |
67 | | - run: groovy read-manifest.groovy release/${{ fromJson(steps.info.outputs.latestJson)[0].name }} "Minecraft-Version" >> "$GITHUB_OUTPUT" |
68 | | - |
69 | | - - name: NeoForge Version |
70 | | - id: neoforge |
71 | | - run: groovy read-manifest.groovy release/${{ fromJson(steps.info.outputs.latestJson)[0].name }} "NeoForge-Version" >> "$GITHUB_OUTPUT" |
72 | | - |
73 | | - - name: Add Artifact |
74 | | - uses: actions/upload-artifact@v4 |
75 | | - with: |
76 | | - name: release |
77 | | - path: release |
78 | | - |
79 | 14 | announce: |
80 | 15 | name: Discord Announcement |
81 | | - needs: [ get-package-info ] |
82 | 16 | runs-on: ubuntu-22.04 |
83 | 17 | steps: |
84 | 18 | - name: Grab JAR and Info |
|
0 commit comments