Trying to fix the issue where it gives a lot of files instead of one.
This commit is contained in:
@@ -131,14 +131,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload the mod JAR
|
- name: Upload the mod JAR
|
||||||
run: |
|
run: |
|
||||||
# Use the artifact downloaded in the previous step
|
# Find the main jar (usually does NOT contain -sources or -dev in the name)
|
||||||
JAR_FILE=$(ls ./release-artifacts/*.jar | head -n 1)
|
JAR_FILE=$(ls ./release-artifacts/*.jar | grep -vE "sources|dev|api|all" | head -n 1)
|
||||||
|
|
||||||
if [ ! -f "$JAR_FILE" ]; then
|
if [ ! -f "$JAR_FILE" ]; then
|
||||||
echo "Error: JAR not found in ./release-artifacts/"
|
echo "Error: Main JAR not found in ./release-artifacts/"
|
||||||
|
ls ./release-artifacts/
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Uploading: $(basename $JAR_FILE)"
|
||||||
|
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||||
-H "Content-Type: application/java-archive" \
|
-H "Content-Type: application/java-archive" \
|
||||||
|
|||||||
Reference in New Issue
Block a user