Compare commits
19 Commits
ae5783aa1d
...
szar-26.4.
| Author | SHA1 | Date | |
|---|---|---|---|
| c79d223f7e | |||
| 790ebd2535 | |||
| 994d2b961b | |||
| 77f71be086 | |||
| 169e9eff08 | |||
| 5dcf4fc221 | |||
| 34b8fccf24 | |||
| 62ad19516b | |||
| c3eb514db7 | |||
| 4bc0779967 | |||
| ab32bc230e | |||
| 034fac759c | |||
| aa07b71ed1 | |||
| 20027a974a | |||
| 539e4ad637 | |||
| 1313fd97db | |||
| b9393d179e | |||
| 5a42ec1e9e | |||
| 245f5ea035 |
@@ -18,11 +18,19 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Ensure Gradle wrapper exists
|
||||
run: |
|
||||
if [ ! -f "./gradlew" ]; then
|
||||
echo "ERROR: gradlew not found in repository!"
|
||||
echo "Please run 'gradle wrapper' locally and push the files."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build mod
|
||||
run: ./gradlew build
|
||||
run: ./gradlew build --no-daemon --max-workers=1 -Dorg.gradle.jvmargs="-Xmx1g -XX:MaxMetaspaceSize=256m"
|
||||
|
||||
- name: Read mod info
|
||||
id: mod_info
|
||||
@@ -67,16 +75,22 @@ jobs:
|
||||
path: ./release-artifacts/
|
||||
|
||||
- name: Install jq
|
||||
run: sudo apt-get update && sudo apt-get install -y jq
|
||||
run: apt-get update && apt-get install -y jq
|
||||
|
||||
- name: Read mod info again
|
||||
- name: Read mod info from gradle.properties
|
||||
id: mod_info
|
||||
run: |
|
||||
NAME=$(grep "^archives_base_name" gradle.properties | cut -d'=' -f2)
|
||||
VERSION=$(grep "^mod_version" gradle.properties | cut -d'=' -f2)
|
||||
|
||||
if [ -z "$NAME" ] || [ -z "$VERSION" ]; then
|
||||
echo "Failed to read mod info"
|
||||
exit 1
|
||||
fi
|
||||
JAR="${NAME}-${VERSION}.jar"
|
||||
echo "NAME=$NAME" >> $GITEA_ENV
|
||||
echo "VERSION=$VERSION" >> $GITEA_ENV
|
||||
|
||||
echo "JAR=$JAR" >> $GITEA_ENV
|
||||
- name: Determine tag
|
||||
run: |
|
||||
BASE="${NAME}-${VERSION}"
|
||||
@@ -99,14 +113,12 @@ jobs:
|
||||
echo "TAG=$TAG" >> $GITEA_ENV
|
||||
|
||||
- name: Create release
|
||||
run: |
|
||||
curl -X POST "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" \
|
||||
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tag_name\": \"${TAG}\",
|
||||
\"name\": \"${TAG}\"
|
||||
}"
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: build/libs/*.jar
|
||||
tag_name: ${{ env.TAG }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
||||
|
||||
- name: Get release ID
|
||||
run: |
|
||||
@@ -117,12 +129,20 @@ jobs:
|
||||
|
||||
echo "RELEASE_ID=$RELEASE_ID" >> $GITEA_ENV
|
||||
|
||||
- name: Upload jar to release
|
||||
- name: Upload the mod JAR
|
||||
run: |
|
||||
FILE=$(ls ./release-artifacts/*.jar | head -n 1)
|
||||
# Find the largest JAR file (the main mod file is 120 MiB, others are KiB)
|
||||
JAR_FILE=$(ls -S ./release-artifacts/*.jar | head -n 1)
|
||||
|
||||
if [ ! -f "$JAR_FILE" ]; then
|
||||
echo "Error: Main JAR not found in ./release-artifacts/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading largest file: $(basename $JAR_FILE)"
|
||||
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||
-H "Content-Type: application/java-archive" \
|
||||
--data-binary @"$FILE" \
|
||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $FILE)"
|
||||
--data-binary @"$JAR_FILE" \
|
||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=$(basename $JAR_FILE)"
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
build/
|
||||
run/
|
||||
.idea/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user