Jump Build To Debug CI <8>

This commit is contained in:
ShintoKosei
2024-04-06 22:23:51 +08:00
committed by GitHub
parent 922a85f662
commit f129a1e860
2 changed files with 32 additions and 31 deletions

View File

@@ -23,38 +23,38 @@ jobs:
run: | run: |
git config --global user.email "ci@luminolmc.com" git config --global user.email "ci@luminolmc.com"
git config --global user.name "Luminol CI" git config --global user.name "Luminol CI"
- name: Apply Patches # - name: Apply Patches
run: ./gradlew applyPatches # run: ./gradlew applyPatches
- name: Build # - name: Build
run: ./gradlew createReobfBundlerJar createReobfPaperclipJar # run: ./gradlew createReobfBundlerJar createReobfPaperclipJar
- uses: "actions/upload-artifact@v3" # - uses: "actions/upload-artifact@v3"
with: # with:
name: "Luminol CI Artifacts" # name: "Luminol CI Artifacts"
path: "build/libs/*.jar" # path: "build/libs/*.jar"
- name: Rename jar file # - name: Rename jar file
run: | # run: |
mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar # mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar
mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar # mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar
- name: setenv - name: setenv
run: | run: |
sh scripts/SetENV.sh sh scripts/SetENV.sh
echo "${{ env.tag }}" echo "${{ env.tag }}"
- name: Create Release # - name: Create Release
if: "!contains(github.event.commits[0].message, '[release-skip]')" # if: "!contains(github.event.commits[0].message, '[release-skip]')"
uses: ncipollo/release-action@v1.12.0 # uses: ncipollo/release-action@v1.12.0
with: # with:
tag: ${{ env.tag }} # tag: ${{ env.tag }}
name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} # name: Luminol ${{ env.mcversion }} - ${{ env.commitid }}
body: | # body: |
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commitid }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar) # 📦Version: `${{ env.mcversion }}` | Commit ${{ env.commitid }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar)
This release is automatically compiled by GitHub Actions # This release is automatically compiled by GitHub Actions
artifacts: | # artifacts: |
build/libs/luminol-1.20.4-bundler.jar # build/libs/luminol-1.20.4-bundler.jar
build/libs/luminol-1.20.4-paperclip.jar # build/libs/luminol-1.20.4-paperclip.jar
generateReleaseNotes: true # generateReleaseNotes: true
prerelease: ${{ env.pre }} # prerelease: ${{ env.pre }}
makeLatest: ${{ env.make_latest }} # makeLatest: ${{ env.make_latest }}
token: "${{ secrets.GITHUB_TOKEN }}" # token: "${{ secrets.GITHUB_TOKEN }}"
- name: Push to Api - name: Push to Api
if: "!contains(github.event.commits[0].message, '[release-skip]')" if: "!contains(github.event.commits[0].message, '[release-skip]')"
env: env:

View File

@@ -7,7 +7,7 @@ prop() {
} }
echo "$tag" echo "$tag"
project_id="luminol" project_id="luminol"
mcversion_group=$(prop GroupMCV) mcversion_group=$(prop GroupMCV )
mcversion=$(prop mcVersion) mcversion=$(prop mcVersion)
echo "$mcversion_group - $mcversion" echo "$mcversion_group - $mcversion"
pre=$(prop preVersion) pre=$(prop preVersion)
@@ -16,10 +16,11 @@ if [ $pre = "true" ]; then
else else
channel="default" channel="default"
fi fi
number=$(git log --oneline "ver/1.20.4" ^$(git describe --tags --abbrev=0) | wc -l) latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
number=$(git log --oneline "ver/1.20.4" ^$latest_tag | wc -l)
changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g')
jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar`
echo "$har_sha256" echo "$jar_sha256"
jar_name="luminol-1.20.4-paperclip.jar" jar_name="luminol-1.20.4-paperclip.jar"
ctime=$(date -u +"%s")"000" ctime=$(date -u +"%s")"000"
echo "$ctime" echo "$ctime"