33
33
uses : gradle/actions/setup-gradle@v4 # Use v4 or latest stable version
34
34
35
35
# Gradle with the new updates doesn't support arguments
36
- - name : Build Bukkit and Velocity jar
36
+ - name : Build Bukkit, Velocity and BungeeCord jar
37
37
run : ./gradlew shadowJar
38
38
39
39
- name : Build fabric jar
70
70
echo "path=$JAR_PATH" >> $GITHUB_OUTPUT
71
71
echo "filename=$JAR_FILENAME" >> $GITHUB_OUTPUT
72
72
shell : bash
73
+
74
+ # 7. Find the BungeeCord Shadow Jar file and extract its name
75
+ - name : Find BungeeCord Shadow Jar and Extract Name
76
+ id : find_bungeecord_jar
77
+ run : |
78
+ JAR_PATH=$(find bungeecord/build/libs -maxdepth 1 -name '*.jar' -printf "%s %p\n" | sort -nr | head -n 1 | awk '{print $2}')
79
+ if [ -z "$JAR_PATH" ]; then
80
+ echo "Error: Could not find the shadow JAR file in bungeecord/build/libs/"
81
+ exit 1
82
+ fi
83
+ JAR_FILENAME=$(basename "$JAR_PATH")
84
+ echo "Found JAR path: $JAR_PATH"
85
+ echo "Found JAR filename: $JAR_FILENAME"
86
+ echo "path=$JAR_PATH" >> $GITHUB_OUTPUT
87
+ echo "filename=$JAR_FILENAME" >> $GITHUB_OUTPUT
88
+ shell : bash
73
89
74
- # 7 . Find the Fabric Jar file and extract its name
90
+ # 8 . Find the Fabric Jar file and extract its name
75
91
- name : Find Fabric Jar and Extract Name
76
92
id : find_fabric_jar
77
93
run : |
87
103
echo "filename=$JAR_FILENAME" >> $GITHUB_OUTPUT
88
104
shell : bash
89
105
90
- # 8 . Upload the Bukkit Shadow Jar as a release asset
106
+ # 9 . Upload the Bukkit Shadow Jar as a release asset
91
107
- name : Upload Bukkit Release Asset
92
108
uses : svenstaro/upload-release-action@v2
93
109
with :
97
113
tag : ${{ github.ref }} # The git tag associated with the release that triggered the workflow
98
114
overwrite : true # Optional: Replace asset with the same name if it already exists
99
115
100
- # 9 . Upload the Velocity Shadow Jar as a release asset
116
+ # 10 . Upload the Velocity Shadow Jar as a release asset
101
117
- name : Upload Velocity Release Asset
102
118
uses : svenstaro/upload-release-action@v2
103
119
with :
@@ -107,12 +123,22 @@ jobs:
107
123
tag : ${{ github.ref }} # The git tag associated with the release that triggered the workflow
108
124
overwrite : true # Optional: Replace asset with the same name if it already exists
109
125
110
- # 10. Upload the Fabric Jar as a release asset
126
+ # 11. Upload the BungeeCord Shadow Jar as a release asset
127
+ - name : Upload BungeeCord Release Asset
128
+ uses : svenstaro/upload-release-action@v2
129
+ with :
130
+ repo_token : ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions automatically
131
+ file : ${{ steps.find_bungeecord_jar.outputs.path }} # The path to the JAR found in the previous step
132
+ asset_name : ${{ steps.find_bungeecord_jar.outputs.filename }} # Use the filename extracted earlier
133
+ tag : ${{ github.ref }} # The git tag associated with the release that triggered the workflow
134
+ overwrite : true # Optional: Replace asset with the same name if it already exists
135
+
136
+ # 12. Upload the Fabric Jar as a release asset
111
137
- name : Upload Fabric Release Asset
112
138
uses : svenstaro/upload-release-action@v2
113
139
with :
114
140
repo_token : ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions automatically
115
141
file : ${{ steps.find_fabric_jar.outputs.path }} # The path to the JAR found in the previous step
116
142
asset_name : ${{ steps.find_fabric_jar.outputs.filename }} # Use the filename extracted earlier
117
143
tag : ${{ github.ref }} # The git tag associated with the release that triggered the workflow
118
- overwrite : true # Optional: Replace asset with the same name if it already exists
144
+ overwrite : true # Optional: Replace asset with the same name if it already exists
0 commit comments