Update Luminol

This commit is contained in:
Helvetica Volubi
2025-09-13 02:29:06 +08:00
parent ac6b1e2377
commit 98a8b65665
3 changed files with 45 additions and 9 deletions
+41 -5
View File
@@ -17,6 +17,10 @@ on:
description: "Push to repo if you enter 1, default push if not released else skip push repo"
required: false
default: "0"
comments:
description: "Add comments to release"
required: false
default: ""
permissions: write-all
@@ -28,7 +32,7 @@ jobs:
- name: Checkout Git Repository
uses: actions/checkout@v5
- name: Set up JDK
- name: Set Up JDK
uses: actions/setup-java@v5
with:
distribution: zulu
@@ -59,7 +63,7 @@ jobs:
if: github.event_name != 'pull_request'
run: sh scripts/SetENV.sh
- name: Check if release exists
- name: Check If Release Exists
if: github.event_name != 'pull_request' && env.flag_release == 'true'
run: |
git fetch --tags
@@ -76,23 +80,34 @@ jobs:
counter=$((counter + 1))
done
echo "tag=${{ env.tag }}-${counter}" >> $GITHUB_ENV
echo "release_count= - ${counter}" >> $GITHUB_ENV
fi
echo "release_exists=${release_exists}" >> $GITHUB_ENV
- name: Publish to repo
if: ( github.event_name != 'pull_request' && env.flag_release == 'true' && env.release_exists != 'true' ) || ( env.release_exists == 'true' && inputs.force-push == '1' ) && false # do not push to any repo
if: (( github.event_name != 'pull_request' && env.flag_release == 'true' && env.release_exists != 'true' ) || ( env.release_exists == 'true' && inputs.force-push == '1' )) && false # do not push to any repo
continue-on-error: true
run: ./gradlew --refresh-dependencies generateDevelopmentBundle publish -PpublishDevBundle=true
env:
PRIVATE_MAVEN_REPO_PASSWORD: ${{ secrets.PRIVATE_MAVEN_REPO_PASSWORD }}
PRIVATE_MAVEN_REPO_USERNAME: ${{ secrets.PRIVATE_MAVEN_REPO_USERNAME }}
- name: Create Release
- name: Create Release - Pre Process
if: ( github.event_name != 'pull_request' && env.flag_release == 'true' && env.release_exists != 'true' ) || ( env.release_exists == 'true' && inputs.force-release == '1' )
run: |
if [ ${{ inputs.comments }} == "" ]; then
echo "No comments provided"
echo "flag_comment=true" >> $GITHUB_ENV
else
echo "flag_comment=false" >> $GITHUB_ENV
fi
- name: Create Release - No Comment
if: env.flag_comment == 'false'
uses: ncipollo/release-action@v1
with:
tag: ${{ env.tag }}
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }} - ${{ env.release_count }}
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }}${{ env.release_count }}
body: |
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [![download](https://img.shields.io/github/downloads/LuminolMC/${{ env.project_id }}/${{ env.tag }}/total?color=red&style=flat-square)](https://github.com/LuminolMC/${{ env.project_id }}/releases/download/${{ env.tag }}/${{ env.jar }})
This release is automatically compiled by GitHub Actions
@@ -105,3 +120,24 @@ jobs:
prerelease: ${{ env.pre }}
makeLatest: ${{ env.make_latest }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release - With Comment
if: env.flag_comment == 'true'
uses: ncipollo/release-action@v1
with:
tag: ${{ env.tag }}
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }}${{ env.release_count }}
body: |
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [![download](https://img.shields.io/github/downloads/LuminolMC/${{ env.project_id }}/${{ env.tag }}/total?color=red&style=flat-square)](https://github.com/LuminolMC/${{ env.project_id }}/releases/download/${{ env.tag }}/${{ env.jar }})
This release is automatically compiled by GitHub Actions
### Comments
> ${{ inputs.comments }}
### Branch Info
> ${{ github.ref_name }}
### Commit Message
${{ env.commit_msg }}
artifacts: ${{ env.jar_dir }}
generateReleaseNotes: true
prerelease: ${{ env.pre }}
makeLatest: ${{ env.make_latest }}
token: ${{ secrets.GITHUB_TOKEN }}