Skip to content

Commit 7af58c7

Browse files
committed
Adjust workflows to re-use compilation data, add beta releaser
1 parent 1edb7d3 commit 7af58c7

File tree

5 files changed

+100
-15
lines changed

5 files changed

+100
-15
lines changed

.github/workflows/_datagen.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ jobs:
3838
name: generated-data
3939
path: neoforge-main/src/generated/resources
4040

41+
- name: Store Compiled Core
42+
if: success()
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: build-core
46+
path: core-api/build
47+
4148
- name: Store Compiled
4249
if: success()
4350
uses: actions/upload-artifact@v4

.github/workflows/_publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ jobs:
3434
name: generated-data
3535
path: neoforge-main/src/generated/resources
3636

37-
- name: Pull Compilation Data
37+
- name: Pull Compilation Data (Core)
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: build-core
41+
path: core-api/build
42+
43+
- name: Pull Compilation Data (Main)
3844
uses: actions/download-artifact@v4
3945
with:
4046
name: build-main

.github/workflows/_run-gametests.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,22 @@ jobs:
3737
name: generated-data
3838
path: neoforge-main/src/generated/resources
3939

40-
- name: Build Core
41-
run: ./gradlew :core-api:jar
40+
- name: Pull Compilation Data (Core)
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: build-core
44+
path: core-api/build
4245

43-
- name: Upload built core
44-
uses: actions/upload-artifact@v4
46+
- name: Pull Compilation Data (Main)
47+
uses: actions/download-artifact@v4
4548
with:
46-
name: built-core-api
47-
path: core-api/build/libs
49+
name: build-main
50+
path: neoforge-main/build
4851

4952
- name: Run Game Tests
5053
run: ./gradlew :neoforge-main:runGameTestServer
5154

52-
- name: Upload build failure
55+
- name: Upload test failure
5356
if: failure()
5457
uses: actions/upload-artifact@v4
5558
with:

.github/workflows/release-cf-alpha.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Latest to Curseforge as Alpha
1+
name: Release Latest Nightly to CurseForge as Alpha
22

33
on:
44
workflow_dispatch:
@@ -19,23 +19,23 @@ jobs:
1919
owner: compactmods
2020
repo: compactmachines
2121
group: dev.compactmods.compactmachines.compactmachines-neoforge
22-
filter: "^compactmachines-neoforge-(?:[\\d\\.]+).jar$"
23-
outputFile: compactmachines.json
22+
filter: "^compactmachines-neoforge-(?:[\\d\\.]+)-nightly.jar$"
23+
outputFile: compactmachines-nightly.json
2424

2525
- name: Debug output
2626
run: |
2727
echo "Version: ${{ steps.download-info.outputs.version }}"
28-
cat compactmachines.json
28+
cat compactmachines-nightly.json
2929
3030
- name: Read info into variable [latest]
3131
id: info
32-
run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT
32+
run: echo "latestJson=$(cat compactmachines-nightly.json)" >> $GITHUB_OUTPUT
3333

3434
- name: Download JAR and prepare artifacts
3535
run: |
3636
mkdir release
3737
curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}"
38-
mv compactmachines.json release/compactmachines.json
38+
mv compactmachines-nightly.json release/compactmachines-nightly.json
3939
4040
- name: Add Artifact
4141
uses: actions/upload-artifact@v4
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Read info into variable [latest]
5858
id: info
59-
run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT
59+
run: echo "latestJson=$(cat compactmachines-nightly.json)" >> $GITHUB_OUTPUT
6060

6161
- name: Create CurseForge Release
6262
uses: itsmeow/curseforge-upload@master
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release Latest to CurseForge as Beta
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
get-package-info:
8+
name: Get Latest Package Info
9+
runs-on: ubuntu-22.04
10+
outputs:
11+
version: ${{ steps.download-info.outputs.version }}
12+
steps:
13+
- name: Download Package Info
14+
id: download-info
15+
uses: compactmods/[email protected]
16+
env:
17+
GQL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
owner: compactmods
20+
repo: compactmachines
21+
group: dev.compactmods.compactmachines.compactmachines-neoforge
22+
filter: "^compactmachines-neoforge-(?:[\\d\\.]+).jar$"
23+
outputFile: compactmachines.json
24+
25+
- name: Debug output
26+
run: |
27+
echo "Version: ${{ steps.download-info.outputs.version }}"
28+
cat compactmachines.json
29+
30+
- name: Read info into variable [latest]
31+
id: info
32+
run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT
33+
34+
- name: Download JAR and prepare artifacts
35+
run: |
36+
mkdir release
37+
curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}"
38+
mv compactmachines.json release/compactmachines.json
39+
40+
- name: Add Artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: release
44+
path: release
45+
46+
release-cf:
47+
name: Make Curseforge Release
48+
runs-on: ubuntu-20.04
49+
needs: [get-package-info]
50+
steps:
51+
- name: Grab JAR and Info
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: release
55+
path: .
56+
57+
- name: Read info into variable [latest]
58+
id: info
59+
run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT
60+
61+
- name: Create CurseForge Release
62+
uses: itsmeow/curseforge-upload@master
63+
with:
64+
token: ${{ secrets.CURSEFORGE_TOKEN }}
65+
project_id: ${{ secrets.CF_PROJECT }}
66+
game_endpoint: minecraft
67+
file_path: ${{ fromJson(steps.info.outputs.latestJson)[0].name}}
68+
game_versions: java:Java 21,NeoForge
69+
release_type: beta

0 commit comments

Comments
 (0)