From 06dcc037df92dd3154b650743fb76e01abf943e1 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:17:19 +0800 Subject: [PATCH 01/53] Update CI --- .github/ISSUE_TEMPLATE/bug-report.yml | 68 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.yml | 31 ++++++++++ 2 files changed, 99 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..3f7a879 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,68 @@ +name: Bug反馈 Bug report +description: + 报告Bug,插件不兼容情况,以及其他相关问题。 + Report issues with plugin incompatbility or other behavior related issues. +labels: + - bug +body: + - type: markdown + attributes: + value: | + 请详细描述您所遇到的Bug。确保您**真的**遇到了**服务端**Bug,而非原版特性或客户端Bug。 + Please describe the bug you encountered in detail. Make sure you're **actually** hitting a **server-side** bug, not a vanilla feature or client-side bug.
+ 如果您确定的话,就按照下面的模板填充信息,并提交反馈。 + If you are sure, follow the template below to fill in the information and submit your feedback.
+ 如果此bug被尝试修复,您可以帮助我们测试并回复。若bug的确被修复,您可以关闭issue来让开发者确认。 + If this bug is tried to fix, you can help us test and reply. If the bug is fixed, you can close the issue to let the developer confirm. + - type: input + id: leavesMC-version + attributes: + label: 服务端版本 LuminolMC Version + description: + LuminolMC服务端发行版本 LuminolMC server release version (contains the git commit's hash)
+ 通过执行`/version`命令将获取到的内容复制到这里。 Run `/version` on your server and paste the full, unmodified output here. + placeholder: > + e.g. git-Luminol-"0635a89" (MC: 1.20.4) + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: 预期的行为 Expected behavior + description: 你期望看到的情况是什么样。What you expected to see. + placeholder: e.g. 使用 /tpsbar [NAME] 命令可以切换TPSBAR的开关 + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: 观测到的实际行为 Observed/Actual behavior + description: 你实际看到的。 What you actually saw. + placeholder: e.g. 使用 /tpsbar [NAME] 命令切换不了TPSBAR + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: 复现步骤 Steps/models to reproduce + description: + 这里应该有一个图片、视频或其他信息来展现你的问题。
+ This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. + placeholder: e.g. 登录其他账号,使用 /tpsbar [NAME] 命令切换不了TPSBAR + validations: + required: true + - type: textarea + id: plugin-list + attributes: + label: 插件与数据包列表。 Plugin and Datapack List. + description: + 服务器上的所有插件和数据包列表。 + All plugins and datapacks running on your server.
+ 执行命令`/plugins`查看插件列表。执行命令`/datapack list`查看数据包列表。 + To list plugins, run `/plugins`. For datapacks, run `/datapack list`. + validations: + required: true + - type: textarea + id: other + attributes: + label: 更多详细信息。 The more information. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..d079c56 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,31 @@ +name: 新的需求 Feature Request +description: + 为Luminol提供新的想法。 + Suggest an idea for Luminol. +labels: + - enhancement +body: + - type: markdown + attributes: + value: | + 感谢您为 Luminol 提交新的需求!请尽可能详细地描述,以便我们可以更轻松地考虑和审查请求。 + Thank you for filling out a feature request for Luminol! Please be as detailed as possible so that we may consider and review the request easier.
+ 请搜索所有问题以避免重复的功能请求。如果您期望的功能已存在,请回复如果您有什么要补充的。 + We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
+ 在请求新功能之前,请确保您使用的是最新版本并且您请求的功能不在 Luminol 中。 + Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
+ 我们的开发人员可能没有过多时间来测试新功能的可用性,如新功能进入Test状态,您可以帮助我们进行测试并回复。 + Our developers may not have much time to test the usability of new functions. If the new functions enter the Test state, you can help us test and reply. + + - type: textarea + id: feature + attributes: + label: 描述你希望添加的功能。 Describe the feature you'd like. + placeholder: e.g. 添加新的PATH + validations: + required: true + - type: textarea + id: othre + attributes: + label: 其他 Other + description: 添加其他的信息。 Add any other context or screenshots about the feature request below. \ No newline at end of file From bdd41593e028b024616118632e4c9a4519cda615 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:18:39 +0800 Subject: [PATCH 02/53] [ci skip]Add CI v2 --- .github/workflows/build_1_20_4.yml | 2 +- .github/workflows/build_1_20_4_v2.yml | 74 +++++++++++++++++++++++++++ scripts/Get&SetENV.sh | 15 ++++++ scripts/PushToAPI.sh | 27 ++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_1_20_4_v2.yml create mode 100644 scripts/Get&SetENV.sh diff --git a/.github/workflows/build_1_20_4.yml b/.github/workflows/build_1_20_4.yml index e427438..577145a 100644 --- a/.github/workflows/build_1_20_4.yml +++ b/.github/workflows/build_1_20_4.yml @@ -37,7 +37,7 @@ jobs: - name: Build project to paperclip jar uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 with: - arguments: createReobfPaperclipJar + arguments: createReobfBundlerJar createReobfPaperclipJar - name: Capture build artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml new file mode 100644 index 0000000..e401e30 --- /dev/null +++ b/.github/workflows/build_1_20_4_v2.yml @@ -0,0 +1,74 @@ +name: Luminol CI v2 - Ver/1.20.4 + +on: + # push: + # branches: [ "ver/1.20.4" ] + # pull_request: + # branches: [ "ver/1.20.4" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Git Repository + uses: actions/checkout@v3 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - name: Setup Git Config + run: | + git config --global user.email "ci@luminolmc.com" + git config --global user.name "Luminol CI" + - name: Apply Patches + run: ./gradlew applyPatches + - name: Build + run: ./gradlew createReobfBundlerJar createReobfPaperclipJar + - uses: "actions/upload-artifact@v3" + with: + name: "Luminol CI Artifacts" + path: "build/libs/*.jar" + - name: Get version from asset + id: get_version + run: echo "::set-output name=version::$(echo build/libs/*.jar | grep -oP 'bundler-\K\d+\.\d+\.\d+' | head -1)" + - name: Set outputs + id: short_sha + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Set env + run: echo "tag=${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}" >> $GITHUB_ENV + - name: Rename jar file + 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar + - name: Get Release Info + run: sh scripts/Get&SetENV.sh + - name: Create Release + if: github.event.commits[0].message != '[release-skip]' + uses: ncipollo/release-action@v1.12.0 + with: + tag: ${{ env.tag }} + name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} + body: | + 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) + This release is automatically compiled by GitHub Actions + artifacts: | + build/libs/luminol-1.20.4-bundler.jar + build/libs/luminol-1.20.4-paperclip.jar + generateReleaseNotes: true + prerelease: ${{ env.pre }} + makeLatest: ${{ env.make_latest }} + token: ${{ secrets.GITHUB_TOKEN }} + - name: Push to Api + if: github.event.commits[0].message != '[release-skip]' + env: + secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} + tag: ${{ env.tag }} + run: sh scripts/PushToAPI.sh \ No newline at end of file diff --git a/scripts/Get&SetENV.sh b/scripts/Get&SetENV.sh new file mode 100644 index 0000000..a4f639e --- /dev/null +++ b/scripts/Get&SetENV.sh @@ -0,0 +1,15 @@ +prop() { + grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//' +} + +commitid=$(git log --pretty='%h' -1) +mcversion=$(prop mcVersion) +preVersion=$(prop preVersion) +release_tag="$mcversion-$commitid" +jarName="build/libs/luminol-1.20.4-paperclip.jar" +make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") + +echo "tag=$release_tag" >> $GITHUB_ENV +echo "jar=$jarName" >> $GITHUB_ENV +echo "pre=$preVersion" >> $GITHUB_ENV +echo "make_latest=$make_latest" >> $GITHUB_ENV \ No newline at end of file diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index e69de29..c4aea19 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -0,0 +1,27 @@ +sha256() { + sha256sum $1 | awk '{print $1}' +} + +prop() { + grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//' +} +echo "$tag" +project_id="luminol" +project_name="uminol" +mcversion=$(prop mcVersion) +ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +pre=$(prop preVersion) +if [ $pre = "true" ]; then + channel="experimental" +else + channel="default" +fi +promoted=false + +number=$(git log --oneline master ^`git describe --tags --abbrev=0` | wc -l) +changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') +jar_name="build/libs/luminol-1.20.4-paperclip.jar" +jar_sha256=`sha256 $jar_name` + +# v2 +curl --location --request POST "https://api.luminolmc.com/v2/commit/build" --header "Content-Type: application/json" --header "Authentication: Bearer $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file From eb3502eb867fb34176ca69b2363f901d92f600ea Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:29:18 +0800 Subject: [PATCH 03/53] [ci skip]Change file name --- .github/workflows/build_1_20_4_v2.yml | 2 +- scripts/{Get&SetENV.sh => GetSetENV.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/{Get&SetENV.sh => GetSetENV.sh} (100%) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index e401e30..57d887f 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -49,7 +49,7 @@ jobs: 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 - name: Get Release Info - run: sh scripts/Get&SetENV.sh + run: sh scripts/GetSetENV.sh - name: Create Release if: github.event.commits[0].message != '[release-skip]' uses: ncipollo/release-action@v1.12.0 diff --git a/scripts/Get&SetENV.sh b/scripts/GetSetENV.sh similarity index 100% rename from scripts/Get&SetENV.sh rename to scripts/GetSetENV.sh From e8b9aaee4878386ba8a6df44254b6788860688ac Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:52:36 +0800 Subject: [PATCH 04/53] [ci skip]change gradle.properties: pre --- .github/workflows/build_1_20_4_v2.yml | 2 +- gradle.properties | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 57d887f..c07cee7 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -48,7 +48,7 @@ jobs: 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - - name: Get Release Info + - name: Get and Set ENV run: sh scripts/GetSetENV.sh - name: Create Release if: github.event.commits[0].message != '[release-skip]' diff --git a/gradle.properties b/gradle.properties index 5c0e033..ea25daf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,3 +7,5 @@ org.gradle.caching = true org.gradle.parallel = true org.gradle.vfs.watch = false org.gradle.jvmargs = -Xmx3G +mcVersion=1.20.4 +preVersion=false \ No newline at end of file From 124a240fe97b6226aa1821bc16de05fa81c582f5 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:53:49 +0800 Subject: [PATCH 05/53] [ci skip]update API.sh --- scripts/PushToAPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index c4aea19..810b782 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -24,4 +24,4 @@ jar_name="build/libs/luminol-1.20.4-paperclip.jar" jar_sha256=`sha256 $jar_name` # v2 -curl --location --request POST "https://api.luminolmc.com/v2/commit/build" --header "Content-Type: application/json" --header "Authentication: Bearer $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file +curl --location --request POST "https://api.luminolmc.com/v2/commit/build" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file From 6b679bc02e36ba0e768bf0014714c150eb2ad545 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 16:10:40 +0800 Subject: [PATCH 06/53] [ci skip]Update CI --- .github/workflows/build_1_20_4_v2.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index c07cee7..d8a9139 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -1,11 +1,11 @@ name: Luminol CI v2 - Ver/1.20.4 on: - # push: - # branches: [ "ver/1.20.4" ] - # pull_request: - # branches: [ "ver/1.20.4" ] - workflow_dispatch: + push: + branches: [ "ver/1.20.4" ] + pull_request: + branches: [ "ver/1.20.4" ] + # workflow_dispatch: jobs: build: From e69cf4c9eca73172ec18c3380fe2477e75ee0548 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 16:13:21 +0800 Subject: [PATCH 07/53] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fb47da6..983484f 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,4 @@ QQ群: [368632360](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=MfosKhcDd8Fdxn1MREu Star历史表 + From 07bbbd3d7e6b76dea2be7ca49daf1e089b64e10a Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 16:21:50 +0800 Subject: [PATCH 08/53] update ci --- .github/workflows/build_1_20_4_v2.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index d8a9139..9e9b337 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout Git Repository uses: actions/checkout@v3 - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + # - name: Validate Gradle wrapper + # uses: gradle/wrapper-validation-action@v1 + # - name: Setup Gradle + # uses: gradle/gradle-build-action@v2 - name: Set up JDK uses: actions/setup-java@v3 with: @@ -51,7 +51,7 @@ jobs: - name: Get and Set ENV run: sh scripts/GetSetENV.sh - name: Create Release - if: github.event.commits[0].message != '[release-skip]' + if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 with: tag: ${{ env.tag }} @@ -67,7 +67,7 @@ jobs: makeLatest: ${{ env.make_latest }} token: ${{ secrets.GITHUB_TOKEN }} - name: Push to Api - if: github.event.commits[0].message != '[release-skip]' + if: "!contains(github.event.commits[0].message, '[release-skip]')" env: secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} tag: ${{ env.tag }} From 2914a219e2ebc5a679ada28d7ad970e7c23aee74 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 16:32:40 +0800 Subject: [PATCH 09/53] update ci --- .github/workflows/build_1_20_4_v2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 9e9b337..5c30ae9 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -65,10 +65,10 @@ jobs: generateReleaseNotes: true prerelease: ${{ env.pre }} makeLatest: ${{ env.make_latest }} - token: ${{ secrets.GITHUB_TOKEN }} + token: "${{ secrets.GITHUB_TOKEN }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: - secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} - tag: ${{ env.tag }} + secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} + tag: ${{ env.tag }} run: sh scripts/PushToAPI.sh \ No newline at end of file From 3b1a8cc929e69e644de3b42f8b29cf6ca9c51858 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 16:44:12 +0800 Subject: [PATCH 10/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 5c30ae9..ed1979a 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -65,7 +65,7 @@ jobs: generateReleaseNotes: true prerelease: ${{ env.pre }} makeLatest: ${{ env.make_latest }} - token: "${{ secrets.GITHUB_TOKEN }}" + token: "${{ secrets.GHP }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: From 120ddafc2fcd343dc7350c421e6a6cd07b7902d1 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 16:56:25 +0800 Subject: [PATCH 11/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 36 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index ed1979a..74cce49 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -50,22 +50,34 @@ jobs: mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: Get and Set ENV run: sh scripts/GetSetENV.sh - - name: Create Release - if: "!contains(github.event.commits[0].message, '[release-skip]')" - uses: ncipollo/release-action@v1.12.0 +# - name: Create Release +# if: "!contains(github.event.commits[0].message, '[release-skip]')" +# uses: ncipollo/release-action@v1.12.0 +# with: +# tag: ${{ env.tag }} +# name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} +# body: | +# 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) +# This release is automatically compiled by GitHub Actions +# artifacts: | +# build/libs/luminol-1.20.4-bundler.jar +# build/libs/luminol-1.20.4-paperclip.jar +# generateReleaseNotes: true +# prerelease: ${{ env.pre }} +# makeLatest: ${{ env.make_latest }} +# token: "${{ secrets.GITHUB_TOKEN }}" + - name: Release Artifacts + uses: svenstaro/upload-release-action@v2 with: + release_name: "Luminol MC1.20.4 - ${{ github.event.repository.updated_at}}" tag: ${{ env.tag }} - name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} body: | - 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) - This release is automatically compiled by GitHub Actions - artifacts: | - build/libs/luminol-1.20.4-bundler.jar - build/libs/luminol-1.20.4-paperclip.jar - generateReleaseNotes: true + 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) + This release is automatically compiled by GitHub Actions + repo_token: "${{ secrets.GITHUB_TOKEN }}" + file: "build/libs/luminol-1.20.4-paperclip.jar" + file_glob: true prerelease: ${{ env.pre }} - makeLatest: ${{ env.make_latest }} - token: "${{ secrets.GHP }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: From bc842c855a32da0da422fdafe201935871f18d29 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 17:03:35 +0800 Subject: [PATCH 12/53] update CI --- scripts/PushToAPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 810b782..a6d22f5 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -24,4 +24,4 @@ jar_name="build/libs/luminol-1.20.4-paperclip.jar" jar_sha256=`sha256 $jar_name` # v2 -curl --location --request POST "https://api.luminolmc.com/v2/commit/build" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file From 1de9ca9d5f112976bfdb1351f65b7b9ba060bbfc Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 17:05:59 +0800 Subject: [PATCH 13/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 74cce49..086d55a 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -83,4 +83,4 @@ jobs: env: secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} tag: ${{ env.tag }} - run: sh scripts/PushToAPI.sh \ No newline at end of file + run: sh scripts/PushToAPI.sh From a0779956f1a91fde74c471e99a825e585b675fc0 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 17:16:17 +0800 Subject: [PATCH 14/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 086d55a..1a7440a 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -74,7 +74,7 @@ jobs: body: | 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) This release is automatically compiled by GitHub Actions - repo_token: "${{ secrets.GITHUB_TOKEN }}" + repo_token: "${{ secrets.GHP }}" file: "build/libs/luminol-1.20.4-paperclip.jar" file_glob: true prerelease: ${{ env.pre }} From 8a292a655a8379eb58ae0391cccaa2cffb6833ee Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Sat, 6 Apr 2024 17:26:39 +0800 Subject: [PATCH 15/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 1a7440a..78a6204 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -71,10 +71,10 @@ jobs: with: release_name: "Luminol MC1.20.4 - ${{ github.event.repository.updated_at}}" tag: ${{ env.tag }} - body: | - 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) - This release is automatically compiled by GitHub Actions - repo_token: "${{ secrets.GHP }}" +# body: | +# 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) +# This release is automatically compiled by GitHub Actions + repo_token: "${{ secrets.GITHUB_TOKEN }}" file: "build/libs/luminol-1.20.4-paperclip.jar" file_glob: true prerelease: ${{ env.pre }} From 75266cceedb8e9ce2a81b98b639152bebfa8809b Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 17:44:45 +0800 Subject: [PATCH 16/53] Update CI --- .github/workflows/build_1_20_4.yml | 4 +-- .github/workflows/build_1_20_4_v2.yml | 44 +++++++++------------------ 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build_1_20_4.yml b/.github/workflows/build_1_20_4.yml index 577145a..80d6efa 100644 --- a/.github/workflows/build_1_20_4.yml +++ b/.github/workflows/build_1_20_4.yml @@ -9,9 +9,9 @@ name: LuminolCI - Ver/1.20.4 on: push: - branches: [ "ver/1.20.4" ] + # branches: [ "ver/1.20.4" ] pull_request: - branches: [ "ver/1.20.4" ] + # branches: [ "ver/1.20.4" ] permissions: write-all diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 78a6204..adcc450 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ "ver/1.20.4" ] # workflow_dispatch: - +permissions: write-all jobs: build: runs-on: ubuntu-latest @@ -14,10 +14,6 @@ jobs: steps: - name: Checkout Git Repository uses: actions/checkout@v3 - # - name: Validate Gradle wrapper - # uses: gradle/wrapper-validation-action@v1 - # - name: Setup Gradle - # uses: gradle/gradle-build-action@v2 - name: Set up JDK uses: actions/setup-java@v3 with: @@ -50,34 +46,22 @@ jobs: mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: Get and Set ENV run: sh scripts/GetSetENV.sh -# - name: Create Release -# if: "!contains(github.event.commits[0].message, '[release-skip]')" -# uses: ncipollo/release-action@v1.12.0 -# with: -# tag: ${{ env.tag }} -# name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} -# body: | -# 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) -# This release is automatically compiled by GitHub Actions -# artifacts: | -# build/libs/luminol-1.20.4-bundler.jar -# build/libs/luminol-1.20.4-paperclip.jar -# generateReleaseNotes: true -# prerelease: ${{ env.pre }} -# makeLatest: ${{ env.make_latest }} -# token: "${{ secrets.GITHUB_TOKEN }}" - - name: Release Artifacts - uses: svenstaro/upload-release-action@v2 + - name: Create Release + if: "!contains(github.event.commits[0].message, '[release-skip]')" + uses: ncipollo/release-action@v1.12.0 with: - release_name: "Luminol MC1.20.4 - ${{ github.event.repository.updated_at}}" tag: ${{ env.tag }} -# body: | -# 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) -# This release is automatically compiled by GitHub Actions - repo_token: "${{ secrets.GITHUB_TOKEN }}" - file: "build/libs/luminol-1.20.4-paperclip.jar" - file_glob: true + name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} + body: | + 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) + This release is automatically compiled by GitHub Actions + artifacts: | + build/libs/luminol-1.20.4-bundler.jar + build/libs/luminol-1.20.4-paperclip.jar + generateReleaseNotes: true prerelease: ${{ env.pre }} + makeLatest: ${{ env.make_latest }} + token: "${{ secrets.GITHUB_TOKEN }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: From 71a7127bb121e00c63310e1e0cd59a2cee021065 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 18:13:22 +0800 Subject: [PATCH 17/53] Update CI --- .github/workflows/build_1_20_4.yml | 4 ++-- .github/workflows/build_1_20_4_v2.yml | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_1_20_4.yml b/.github/workflows/build_1_20_4.yml index 80d6efa..ea31b7c 100644 --- a/.github/workflows/build_1_20_4.yml +++ b/.github/workflows/build_1_20_4.yml @@ -8,9 +8,9 @@ name: LuminolCI - Ver/1.20.4 on: - push: + # push: # branches: [ "ver/1.20.4" ] - pull_request: + # pull_request: # branches: [ "ver/1.20.4" ] permissions: write-all diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index adcc450..0d103f1 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -33,13 +33,11 @@ jobs: path: "build/libs/*.jar" - name: Get version from asset id: get_version - run: echo "::set-output name=version::$(echo build/libs/*.jar | grep -oP 'bundler-\K\d+\.\d+\.\d+' | head -1)" - - name: Set outputs - id: short_sha run: | + version=$(echo build/libs/*.jar | grep -oP 'bundler-\K\d+\.\d+\.\d+' | head -1) + echo "version=${version}" >> $GITHUB_ENV echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Set env - run: echo "tag=${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}" >> $GITHUB_ENV + echo "tag=${{ env.version }}-${{ env.sha_short }}" >> $GITHUB_ENV - name: Rename jar file run: | mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar @@ -51,9 +49,9 @@ jobs: uses: ncipollo/release-action@v1.12.0 with: tag: ${{ env.tag }} - name: Luminol ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }} + name: Luminol ${{ env.version }} - ${{ env.sha_short }} body: | - 📦Version: `${{ steps.get_version.outputs.version }}` | Commit ${{ steps.short_sha.outputs.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ steps.get_version.outputs.version }}-${{ steps.short_sha.outputs.sha_short }}/luminol-1.20.4-paperclip.jar) + 📦Version: `${{ env.version }}` | Commit ${{ env.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar) This release is automatically compiled by GitHub Actions artifacts: | build/libs/luminol-1.20.4-bundler.jar From 7522e3c67b61f7245f41f952c7863f0d96fbc2ac Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 18:40:49 +0800 Subject: [PATCH 18/53] Update CI --- .../{build_1_20_4.yml => build_1_20_4.yml_no} | 8 ++++---- .github/workflows/build_1_20_4_v2.yml | 15 ++++----------- scripts/PushToAPI.sh | 4 ++-- scripts/{GetSetENV.sh => SetENV.sh} | 2 ++ 4 files changed, 12 insertions(+), 17 deletions(-) rename .github/workflows/{build_1_20_4.yml => build_1_20_4.yml_no} (95%) rename scripts/{GetSetENV.sh => SetENV.sh} (85%) diff --git a/.github/workflows/build_1_20_4.yml b/.github/workflows/build_1_20_4.yml_no similarity index 95% rename from .github/workflows/build_1_20_4.yml rename to .github/workflows/build_1_20_4.yml_no index ea31b7c..577145a 100644 --- a/.github/workflows/build_1_20_4.yml +++ b/.github/workflows/build_1_20_4.yml_no @@ -8,10 +8,10 @@ name: LuminolCI - Ver/1.20.4 on: - # push: - # branches: [ "ver/1.20.4" ] - # pull_request: - # branches: [ "ver/1.20.4" ] + push: + branches: [ "ver/1.20.4" ] + pull_request: + branches: [ "ver/1.20.4" ] permissions: write-all diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 0d103f1..56cfd27 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -31,27 +31,20 @@ jobs: with: name: "Luminol CI Artifacts" path: "build/libs/*.jar" - - name: Get version from asset - id: get_version - run: | - version=$(echo build/libs/*.jar | grep -oP 'bundler-\K\d+\.\d+\.\d+' | head -1) - echo "version=${version}" >> $GITHUB_ENV - echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - echo "tag=${{ env.version }}-${{ env.sha_short }}" >> $GITHUB_ENV - name: Rename jar file 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - - name: Get and Set ENV - run: sh scripts/GetSetENV.sh + - name: Set ENV + run: sh scripts/SetENV.sh - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 with: tag: ${{ env.tag }} - name: Luminol ${{ env.version }} - ${{ env.sha_short }} + name: Luminol ${{ env.version }} - ${{ env.commitid }} body: | - 📦Version: `${{ env.version }}` | Commit ${{ env.sha_short }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar) + 📦Version: `${{ env.version }}` | Commit ${{ env.commitid }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar) This release is automatically compiled by GitHub Actions artifacts: | build/libs/luminol-1.20.4-bundler.jar diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index a6d22f5..4055fbc 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,7 +7,7 @@ prop() { } echo "$tag" project_id="luminol" -project_name="uminol" +project_name="luminol" mcversion=$(prop mcVersion) ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ") pre=$(prop preVersion) @@ -18,7 +18,7 @@ else fi promoted=false -number=$(git log --oneline master ^`git describe --tags --abbrev=0` | wc -l) +number=$(git log --oneline ver/1.20.4 ^`git describe --tags --abbrev=0` | wc -l) changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') jar_name="build/libs/luminol-1.20.4-paperclip.jar" jar_sha256=`sha256 $jar_name` diff --git a/scripts/GetSetENV.sh b/scripts/SetENV.sh similarity index 85% rename from scripts/GetSetENV.sh rename to scripts/SetENV.sh index a4f639e..a70b90a 100644 --- a/scripts/GetSetENV.sh +++ b/scripts/SetENV.sh @@ -9,6 +9,8 @@ release_tag="$mcversion-$commitid" jarName="build/libs/luminol-1.20.4-paperclip.jar" make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") +echo "commitid=$commitid" >> $GITHUB_ENV +echo "version=$mcversion" >> $GITHUB_ENV echo "tag=$release_tag" >> $GITHUB_ENV echo "jar=$jarName" >> $GITHUB_ENV echo "pre=$preVersion" >> $GITHUB_ENV From a9238f8e8ed9033d8b99072e9c56f76d1f274fe5 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 20:29:43 +0800 Subject: [PATCH 19/53] Update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- gradle.properties | 2 ++ scripts/PushToAPI.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 56cfd27..be48976 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -44,7 +44,7 @@ jobs: tag: ${{ env.tag }} name: Luminol ${{ env.version }} - ${{ env.commitid }} body: | - 📦Version: `${{ env.version }}` | Commit ${{ env.commitid }} [![download](https://img.shields.io/github/downloads/LuminolMC/Luminol/${{ env.tag }}/total?color=0&style=flat-square)](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar) + 📦Version: `${{ env.version }}` | 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 artifacts: | build/libs/luminol-1.20.4-bundler.jar diff --git a/gradle.properties b/gradle.properties index ea25daf..91a003e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,5 +7,7 @@ org.gradle.caching = true org.gradle.parallel = true org.gradle.vfs.watch = false org.gradle.jvmargs = -Xmx3G + +mcVersion_Group=1.20 mcVersion=1.20.4 preVersion=false \ No newline at end of file diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 4055fbc..56cc33f 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,21 +7,21 @@ prop() { } echo "$tag" project_id="luminol" -project_name="luminol" +mcversion_group=$(prop mcVersion_Group) mcversion=$(prop mcVersion) -ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +echo "$mcversion_group - $mcversion" pre=$(prop preVersion) if [ $pre = "true" ]; then channel="experimental" else channel="default" fi -promoted=false - -number=$(git log --oneline ver/1.20.4 ^`git describe --tags --abbrev=0` | wc -l) +number=$(git log --oneline "ver/1.20.4" ^$(git describe --tags --abbrev=0) | wc -l) changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') -jar_name="build/libs/luminol-1.20.4-paperclip.jar" -jar_sha256=`sha256 $jar_name` - +jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` +echo "$har_sha256" +jar_name="luminol-1.20.4-paperclip.jar" +ctime=$(date -u +"%s")"000" +echo "$ctime" # v2 -curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}" \ No newline at end of file +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" \ No newline at end of file From 2c09274132d78fb563cb0835e5039dc523d94646 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 20:58:34 +0800 Subject: [PATCH 20/53] Fix CI --- scripts/SetENV.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/SetENV.sh b/scripts/SetENV.sh index a70b90a..3c2dd5d 100644 --- a/scripts/SetENV.sh +++ b/scripts/SetENV.sh @@ -2,8 +2,8 @@ prop() { grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//' } -commitid=$(git log --pretty='%h' -1) -mcversion=$(prop mcVersion) +commitid="$(git log --pretty='%h' -1)" +mcversion="$(prop mcVersion)" preVersion=$(prop preVersion) release_tag="$mcversion-$commitid" jarName="build/libs/luminol-1.20.4-paperclip.jar" From 8546ac56e2f13a6608d9f0ca9f8c0c1d48aa28cd Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:12:48 +0800 Subject: [PATCH 21/53] More Fix CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- scripts/{SetENV.sh => setenv.sh} | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename scripts/{SetENV.sh => setenv.sh} (96%) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index be48976..7d3fd9a 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -36,7 +36,7 @@ jobs: 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 - name: Set ENV - run: sh scripts/SetENV.sh + run: sh scripts/setenv.sh - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 diff --git a/scripts/SetENV.sh b/scripts/setenv.sh similarity index 96% rename from scripts/SetENV.sh rename to scripts/setenv.sh index 3c2dd5d..11c05d5 100644 --- a/scripts/SetENV.sh +++ b/scripts/setenv.sh @@ -11,6 +11,7 @@ make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") echo "commitid=$commitid" >> $GITHUB_ENV echo "version=$mcversion" >> $GITHUB_ENV +echo "$mcversion" echo "tag=$release_tag" >> $GITHUB_ENV echo "jar=$jarName" >> $GITHUB_ENV echo "pre=$preVersion" >> $GITHUB_ENV From dddb28fdf6970f48c2deac6d04c20822723121f1 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:28:13 +0800 Subject: [PATCH 22/53] Jump Build To Debug CI <1> --- .github/workflows/build_1_20_4_v2.yml | 16 +++++++++------- scripts/setenv.sh | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 7d3fd9a..41b28aa 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -27,24 +27,26 @@ jobs: run: ./gradlew applyPatches - name: Build run: ./gradlew createReobfBundlerJar createReobfPaperclipJar - - uses: "actions/upload-artifact@v3" - with: - name: "Luminol CI Artifacts" - path: "build/libs/*.jar" + # - uses: "actions/upload-artifact@v3" + # with: + # name: "Luminol CI Artifacts" + # path: "build/libs/*.jar" - name: Rename jar file 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: Set ENV - run: sh scripts/setenv.sh + run: | + sh scripts/setenv.sh + echo ${{ env.tag }} | ${{ env.mcversion }} | ${{ env.commitid }} | ${{ env.pre }} |${{ env.make_latest }} - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 with: tag: ${{ env.tag }} - name: Luminol ${{ env.version }} - ${{ env.commitid }} + name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} body: | - 📦Version: `${{ env.version }}` | 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 artifacts: | build/libs/luminol-1.20.4-bundler.jar diff --git a/scripts/setenv.sh b/scripts/setenv.sh index 11c05d5..1543bfa 100644 --- a/scripts/setenv.sh +++ b/scripts/setenv.sh @@ -2,15 +2,15 @@ prop() { grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//' } -commitid="$(git log --pretty='%h' -1)" -mcversion="$(prop mcVersion)" +commitid=$(git log --pretty='%h' -1) +mcversion=$(prop mcVersion) preVersion=$(prop preVersion) release_tag="$mcversion-$commitid" jarName="build/libs/luminol-1.20.4-paperclip.jar" make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") echo "commitid=$commitid" >> $GITHUB_ENV -echo "version=$mcversion" >> $GITHUB_ENV +echo "mcversion=$mcversion" >> $GITHUB_ENV echo "$mcversion" echo "tag=$release_tag" >> $GITHUB_ENV echo "jar=$jarName" >> $GITHUB_ENV From 6c6786792f661bf26c3b7519ff2d4cbce43c541f Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:29:00 +0800 Subject: [PATCH 23/53] Jump Build To Debug CI <2> --- .github/workflows/build_1_20_4_v2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 41b28aa..bc68a53 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -23,10 +23,10 @@ jobs: run: | git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - - name: Apply Patches - run: ./gradlew applyPatches - - name: Build - run: ./gradlew createReobfBundlerJar createReobfPaperclipJar + # - name: Apply Patches + # run: ./gradlew applyPatches + # - name: Build + # run: ./gradlew createReobfBundlerJar createReobfPaperclipJar # - uses: "actions/upload-artifact@v3" # with: # name: "Luminol CI Artifacts" From efabe850e09f21c44d7717a3a5936fc139586775 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:29:40 +0800 Subject: [PATCH 24/53] Jump Build To Debug CI <3> --- .github/workflows/build_1_20_4_v2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index bc68a53..1e3c279 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -31,10 +31,10 @@ jobs: # with: # name: "Luminol CI Artifacts" # path: "build/libs/*.jar" - - name: Rename jar file - 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar + # - name: Rename jar file + # 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: Set ENV run: | sh scripts/setenv.sh From a6888b27d0d3f39330677a87533d52683fc66ef2 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:30:20 +0800 Subject: [PATCH 25/53] Jump Build To Debug CI <4> --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 1e3c279..54574ec 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -38,7 +38,7 @@ jobs: - name: Set ENV run: | sh scripts/setenv.sh - echo ${{ env.tag }} | ${{ env.mcversion }} | ${{ env.commitid }} | ${{ env.pre }} |${{ env.make_latest }} + echo "${{ env.tag }} | ${{ env.mcversion }} | ${{ env.commitid }} | ${{ env.pre }} |${{ env.make_latest }}" - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 From d2f2ea4382dca3b2f6e8cc3125ecb4c4c9a6e2cd Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:49:51 +0800 Subject: [PATCH 26/53] Jump Build To Debug CI <5> --- .github/workflows/build_1_20_4_v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 54574ec..29dc893 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -35,10 +35,10 @@ jobs: # 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - - name: Set ENV + - name: setenv run: | sh scripts/setenv.sh - echo "${{ env.tag }} | ${{ env.mcversion }} | ${{ env.commitid }} | ${{ env.pre }} |${{ env.make_latest }}" + echo "${{ env.tag }}" - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" uses: ncipollo/release-action@v1.12.0 From 8914d3fcbcb5e7bbcf074996438c089ce537d2fa Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:58:57 +0800 Subject: [PATCH 27/53] Jump Build To Debug CI <6> --- .github/workflows/build_1_20_4_v2.yml | 2 +- gradle.properties | 2 +- scripts/PushToAPI.sh | 2 +- scripts/setenv.sh | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 29dc893..92102e8 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -37,7 +37,7 @@ jobs: # mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: setenv run: | - sh scripts/setenv.sh + sh scripts/SetENV.sh echo "${{ env.tag }}" - name: Create Release if: "!contains(github.event.commits[0].message, '[release-skip]')" diff --git a/gradle.properties b/gradle.properties index 91a003e..c2118ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ org.gradle.parallel = true org.gradle.vfs.watch = false org.gradle.jvmargs = -Xmx3G -mcVersion_Group=1.20 mcVersion=1.20.4 +mcVersionGroup=1.20 preVersion=false \ No newline at end of file diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 56cc33f..aef7313 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,7 +7,7 @@ prop() { } echo "$tag" project_id="luminol" -mcversion_group=$(prop mcVersion_Group) +mcversion_group=$(prop mcVersionGroup) mcversion=$(prop mcVersion) echo "$mcversion_group - $mcversion" pre=$(prop preVersion) diff --git a/scripts/setenv.sh b/scripts/setenv.sh index 1543bfa..c178dd5 100644 --- a/scripts/setenv.sh +++ b/scripts/setenv.sh @@ -3,11 +3,16 @@ prop() { } commitid=$(git log --pretty='%h' -1) +echo "$commitid" mcversion=$(prop mcVersion) +echo "$mcversion" preVersion=$(prop preVersion) +echo "$preVersion" release_tag="$mcversion-$commitid" +echo "$release_tag" jarName="build/libs/luminol-1.20.4-paperclip.jar" make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") +echo "$make_latest" echo "commitid=$commitid" >> $GITHUB_ENV echo "mcversion=$mcversion" >> $GITHUB_ENV From 88aab8eadcf0cbd32d58b4796285d3691768d181 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:00:28 +0800 Subject: [PATCH 28/53] Jump Build To Debug CI <7> --- scripts/{setenv.sh => SetENV.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{setenv.sh => SetENV.sh} (100%) diff --git a/scripts/setenv.sh b/scripts/SetENV.sh similarity index 100% rename from scripts/setenv.sh rename to scripts/SetENV.sh From d13bfadde463014d6206d1f7507e7613f0f83007 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:02:55 +0800 Subject: [PATCH 29/53] Jump Build To Debug CI <8> --- gradle.properties | 2 +- scripts/PushToAPI.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c2118ea..fa22334 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,5 @@ org.gradle.vfs.watch = false org.gradle.jvmargs = -Xmx3G mcVersion=1.20.4 -mcVersionGroup=1.20 +GroupMCV=1.20 preVersion=false \ No newline at end of file diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index aef7313..f9a83ad 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,7 +7,7 @@ prop() { } echo "$tag" project_id="luminol" -mcversion_group=$(prop mcVersionGroup) +mcversion_group=$(prop GroupMCV) mcversion=$(prop mcVersion) echo "$mcversion_group - $mcversion" pre=$(prop preVersion) From 922a85f662d0d066d3f7fb041af894c8c3fceab7 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:06:15 +0800 Subject: [PATCH 30/53] Update CI --- .github/workflows/build_1_20_4_v2.yml | 24 ++++++++++++------------ scripts/SetENV.sh | 5 ----- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 92102e8..e1a0806 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -23,18 +23,18 @@ jobs: run: | git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - # - name: Apply Patches - # run: ./gradlew applyPatches - # - name: Build - # run: ./gradlew createReobfBundlerJar createReobfPaperclipJar - # - uses: "actions/upload-artifact@v3" - # with: - # name: "Luminol CI Artifacts" - # path: "build/libs/*.jar" - # - name: Rename jar file - # 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar + - name: Apply Patches + run: ./gradlew applyPatches + - name: Build + run: ./gradlew createReobfBundlerJar createReobfPaperclipJar + - uses: "actions/upload-artifact@v3" + with: + name: "Luminol CI Artifacts" + path: "build/libs/*.jar" + - name: Rename jar file + 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: setenv run: | sh scripts/SetENV.sh diff --git a/scripts/SetENV.sh b/scripts/SetENV.sh index c178dd5..1543bfa 100644 --- a/scripts/SetENV.sh +++ b/scripts/SetENV.sh @@ -3,16 +3,11 @@ prop() { } commitid=$(git log --pretty='%h' -1) -echo "$commitid" mcversion=$(prop mcVersion) -echo "$mcversion" preVersion=$(prop preVersion) -echo "$preVersion" release_tag="$mcversion-$commitid" -echo "$release_tag" jarName="build/libs/luminol-1.20.4-paperclip.jar" make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true") -echo "$make_latest" echo "commitid=$commitid" >> $GITHUB_ENV echo "mcversion=$mcversion" >> $GITHUB_ENV From f129a1e8609984adf8123d9fc9b7406d29d14bef Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:23:51 +0800 Subject: [PATCH 31/53] Jump Build To Debug CI <8> --- .github/workflows/build_1_20_4_v2.yml | 56 +++++++++++++-------------- scripts/PushToAPI.sh | 7 ++-- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index e1a0806..77c0d21 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -23,38 +23,38 @@ jobs: run: | git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - - name: Apply Patches - run: ./gradlew applyPatches - - name: Build - run: ./gradlew createReobfBundlerJar createReobfPaperclipJar - - uses: "actions/upload-artifact@v3" - with: - name: "Luminol CI Artifacts" - path: "build/libs/*.jar" - - name: Rename jar file - 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar + # - name: Apply Patches + # run: ./gradlew applyPatches + # - name: Build + # run: ./gradlew createReobfBundlerJar createReobfPaperclipJar + # - uses: "actions/upload-artifact@v3" + # with: + # name: "Luminol CI Artifacts" + # path: "build/libs/*.jar" + # - name: Rename jar file + # 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: setenv run: | sh scripts/SetENV.sh echo "${{ env.tag }}" - - name: Create Release - if: "!contains(github.event.commits[0].message, '[release-skip]')" - uses: ncipollo/release-action@v1.12.0 - with: - tag: ${{ env.tag }} - name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} - 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) - This release is automatically compiled by GitHub Actions - artifacts: | - build/libs/luminol-1.20.4-bundler.jar - build/libs/luminol-1.20.4-paperclip.jar - generateReleaseNotes: true - prerelease: ${{ env.pre }} - makeLatest: ${{ env.make_latest }} - token: "${{ secrets.GITHUB_TOKEN }}" + # - name: Create Release + # if: "!contains(github.event.commits[0].message, '[release-skip]')" + # uses: ncipollo/release-action@v1.12.0 + # with: + # tag: ${{ env.tag }} + # name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} + # 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) + # This release is automatically compiled by GitHub Actions + # artifacts: | + # build/libs/luminol-1.20.4-bundler.jar + # build/libs/luminol-1.20.4-paperclip.jar + # generateReleaseNotes: true + # prerelease: ${{ env.pre }} + # makeLatest: ${{ env.make_latest }} + # token: "${{ secrets.GITHUB_TOKEN }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index f9a83ad..d14d4c9 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,7 +7,7 @@ prop() { } echo "$tag" project_id="luminol" -mcversion_group=$(prop GroupMCV) +mcversion_group=$(prop GroupMCV ) mcversion=$(prop mcVersion) echo "$mcversion_group - $mcversion" pre=$(prop preVersion) @@ -16,10 +16,11 @@ if [ $pre = "true" ]; then else channel="default" 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') 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" ctime=$(date -u +"%s")"000" echo "$ctime" From 1e7b4394ac8391c854f66e2e70ed73e67c52b18f Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:30:17 +0800 Subject: [PATCH 32/53] Jump Build To Debug CI <9> --- scripts/PushToAPI.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index d14d4c9..6959be9 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -7,7 +7,7 @@ prop() { } echo "$tag" project_id="luminol" -mcversion_group=$(prop GroupMCV ) +mcversion_group=$(prop GroupMCV) mcversion=$(prop mcVersion) echo "$mcversion_group - $mcversion" pre=$(prop preVersion) @@ -16,8 +16,8 @@ if [ $pre = "true" ]; then else channel="default" fi -latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) -number=$(git log --oneline "ver/1.20.4" ^$latest_tag | wc -l) + +number=$(git log --oneline ver/1.20.4 ^$(git describe --tags --abbrev=0) | wc -l) 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` echo "$jar_sha256" From 127aa3728aaceb50c3d72eca3a6fb2cc3ff455de Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:32:59 +0800 Subject: [PATCH 33/53] Jump Build To Debug CI <10> --- scripts/PushToAPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 6959be9..ff47d4f 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -16,7 +16,7 @@ if [ $pre = "true" ]; then else channel="default" fi - +echo "Latest tag: $(git describe --tags --abbrev=0)" number=$(git log --oneline ver/1.20.4 ^$(git describe --tags --abbrev=0) | wc -l) 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` From c69ed4279e753477d2569e2702b0a07db38f4047 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:34:17 +0800 Subject: [PATCH 34/53] Jump Build To Debug CI <11> --- scripts/PushToAPI.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index ff47d4f..142d96c 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -16,6 +16,7 @@ if [ $pre = "true" ]; then else channel="default" fi +git checkout ver/1.20.4 echo "Latest tag: $(git describe --tags --abbrev=0)" number=$(git log --oneline ver/1.20.4 ^$(git describe --tags --abbrev=0) | wc -l) changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') From 0bfac950702214044026b4309c5181c96599b7a9 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:35:25 +0800 Subject: [PATCH 35/53] Jump Build To Debug CI <12> --- scripts/PushToAPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 142d96c..cb05384 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -16,7 +16,7 @@ if [ $pre = "true" ]; then else channel="default" fi -git checkout ver/1.20.4 +git tag echo "Latest tag: $(git describe --tags --abbrev=0)" number=$(git log --oneline ver/1.20.4 ^$(git describe --tags --abbrev=0) | wc -l) changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') From 52ab368069ab22aa4051b6dfd0d333a781f77d99 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:15:21 +0800 Subject: [PATCH 36/53] Jump Build To Debug CI <13> --- scripts/PushToAPI.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index cb05384..7241249 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -17,9 +17,7 @@ else channel="default" fi git tag -echo "Latest tag: $(git describe --tags --abbrev=0)" -number=$(git log --oneline ver/1.20.4 ^$(git describe --tags --abbrev=0) | wc -l) -changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g') +changes=$(git log -1 --pretty='[{"commit": "%H", "message": "%s", "summary": "%b"}]') jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` echo "$jar_sha256" jar_name="luminol-1.20.4-paperclip.jar" From 79b6b41b639bc8ab34a865d54f1ce39178eaf556 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:16:27 +0800 Subject: [PATCH 37/53] Jump Build To Debug CI <14> --- scripts/PushToAPI.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 7241249..b20313e 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -18,9 +18,10 @@ else fi git tag changes=$(git log -1 --pretty='[{"commit": "%H", "message": "%s", "summary": "%b"}]') -jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` -echo "$jar_sha256" +echo $changes jar_name="luminol-1.20.4-paperclip.jar" +jar_sha256=`sha256 $jar_name` +echo "$jar_sha256" ctime=$(date -u +"%s")"000" echo "$ctime" # v2 From a40d934630250fbefa59ed7dfe427f9159764177 Mon Sep 17 00:00:00 2001 From: ShintoKosei <67397639+ShintoKosei@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:18:23 +0800 Subject: [PATCH 38/53] UPDATE CI --- .github/workflows/build_1_20_4_v2.yml | 56 +++++++++++++-------------- scripts/PushToAPI.sh | 8 +--- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 77c0d21..e1a0806 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -23,38 +23,38 @@ jobs: run: | git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - # - name: Apply Patches - # run: ./gradlew applyPatches - # - name: Build - # run: ./gradlew createReobfBundlerJar createReobfPaperclipJar - # - uses: "actions/upload-artifact@v3" - # with: - # name: "Luminol CI Artifacts" - # path: "build/libs/*.jar" - # - name: Rename jar file - # 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar + - name: Apply Patches + run: ./gradlew applyPatches + - name: Build + run: ./gradlew createReobfBundlerJar createReobfPaperclipJar + - uses: "actions/upload-artifact@v3" + with: + name: "Luminol CI Artifacts" + path: "build/libs/*.jar" + - name: Rename jar file + 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-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar - name: setenv run: | sh scripts/SetENV.sh echo "${{ env.tag }}" - # - name: Create Release - # if: "!contains(github.event.commits[0].message, '[release-skip]')" - # uses: ncipollo/release-action@v1.12.0 - # with: - # tag: ${{ env.tag }} - # name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} - # 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) - # This release is automatically compiled by GitHub Actions - # artifacts: | - # build/libs/luminol-1.20.4-bundler.jar - # build/libs/luminol-1.20.4-paperclip.jar - # generateReleaseNotes: true - # prerelease: ${{ env.pre }} - # makeLatest: ${{ env.make_latest }} - # token: "${{ secrets.GITHUB_TOKEN }}" + - name: Create Release + if: "!contains(github.event.commits[0].message, '[release-skip]')" + uses: ncipollo/release-action@v1.12.0 + with: + tag: ${{ env.tag }} + name: Luminol ${{ env.mcversion }} - ${{ env.commitid }} + 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) + This release is automatically compiled by GitHub Actions + artifacts: | + build/libs/luminol-1.20.4-bundler.jar + build/libs/luminol-1.20.4-paperclip.jar + generateReleaseNotes: true + prerelease: ${{ env.pre }} + makeLatest: ${{ env.make_latest }} + token: "${{ secrets.GITHUB_TOKEN }}" - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index b20313e..0a8918a 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -5,24 +5,18 @@ sha256() { prop() { grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//' } -echo "$tag" project_id="luminol" mcversion_group=$(prop GroupMCV) mcversion=$(prop mcVersion) -echo "$mcversion_group - $mcversion" pre=$(prop preVersion) if [ $pre = "true" ]; then channel="experimental" else channel="default" fi -git tag changes=$(git log -1 --pretty='[{"commit": "%H", "message": "%s", "summary": "%b"}]') -echo $changes +jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_name="luminol-1.20.4-paperclip.jar" -jar_sha256=`sha256 $jar_name` -echo "$jar_sha256" ctime=$(date -u +"%s")"000" -echo "$ctime" # v2 curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" \ No newline at end of file From a1ba25723848c8b71ebf76897c4245752330758b Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 18:46:28 +0800 Subject: [PATCH 39/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 78a6204..b4ed27d 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -81,6 +81,6 @@ jobs: - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: - secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }} + secret_v2: ${{ secrets.API_SERECT }} tag: ${{ env.tag }} run: sh scripts/PushToAPI.sh From bd1178911d5755df8f1655de57b9acecf7b1d7fe Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:03:54 +0800 Subject: [PATCH 40/53] update CI --- scripts/PushToAPI.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 0a8918a..ce987c9 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -19,4 +19,5 @@ jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_name="luminol-1.20.4-paperclip.jar" ctime=$(date -u +"%s")"000" # v2 +echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" \ No newline at end of file From 1334c291e5d78904fa86077acd0c71913319483f Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:25:45 +0800 Subject: [PATCH 41/53] update CI --- scripts/PushToAPI.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index ce987c9..1540db9 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -19,5 +19,6 @@ jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_name="luminol-1.20.4-paperclip.jar" ctime=$(date -u +"%s")"000" # v2 +echo "Authentication: $secret_v2" echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" \ No newline at end of file From 9243eea30b72c5cf7a71f353fe09e8d8b4589f0f Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:40:30 +0800 Subject: [PATCH 42/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 0355a5c..ca693b4 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -9,7 +9,7 @@ on: permissions: write-all jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout Git Repository @@ -58,6 +58,6 @@ jobs: - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: - secret_v2: ${{ secrets.API_SERECT }} + secret_v2: ${{ vars.API_KEY }} tag: ${{ env.tag }} run: sh scripts/PushToAPI.sh From 6d39abe16816fa15efbfe61196add453707580d0 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:45:36 +0800 Subject: [PATCH 43/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index ca693b4..a121393 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -21,6 +21,7 @@ jobs: java-version: '17' - name: Setup Git Config run: | + export HOME=/home/klop233 git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - name: Apply Patches From 06a87833f3082b0fd417713fa78a174c44649511 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:51:19 +0800 Subject: [PATCH 44/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index a121393..54d8bb4 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -21,7 +21,7 @@ jobs: java-version: '17' - name: Setup Git Config run: | - export HOME=/home/klop233 + export HOME=/root git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - name: Apply Patches From 3313ff7c6185262fa6960a43dd12d152dd221f3f Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:52:07 +0800 Subject: [PATCH 45/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 54d8bb4..a121393 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -21,7 +21,7 @@ jobs: java-version: '17' - name: Setup Git Config run: | - export HOME=/root + export HOME=/home/klop233 git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - name: Apply Patches From cc0312cd766902eea8a040766dadd765782f5d7f Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 19:52:41 +0800 Subject: [PATCH 46/53] update CI --- .github/workflows/build_1_20_4_v2.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index a121393..27eabb0 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -9,7 +9,7 @@ on: permissions: write-all jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Checkout Git Repository @@ -21,7 +21,6 @@ jobs: java-version: '17' - name: Setup Git Config run: | - export HOME=/home/klop233 git config --global user.email "ci@luminolmc.com" git config --global user.name "Luminol CI" - name: Apply Patches From b81eb1857cca652f425ebe0e9bf6d35cd6a9e597 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 20:08:32 +0800 Subject: [PATCH 47/53] Update CI --- .github/workflows/build_1_20_4_v2.yml | 1 + scripts/SetENV.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 27eabb0..47433b4 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -9,6 +9,7 @@ on: permissions: write-all jobs: build: + environment: default runs-on: ubuntu-latest steps: diff --git a/scripts/SetENV.sh b/scripts/SetENV.sh index 1543bfa..88f4caa 100644 --- a/scripts/SetENV.sh +++ b/scripts/SetENV.sh @@ -15,4 +15,4 @@ echo "$mcversion" echo "tag=$release_tag" >> $GITHUB_ENV echo "jar=$jarName" >> $GITHUB_ENV echo "pre=$preVersion" >> $GITHUB_ENV -echo "make_latest=$make_latest" >> $GITHUB_ENV \ No newline at end of file +echo "make_latest=$make_latest" >> $GITHUB_ENV From d66ce6fb87cc695c12ed4cbd98688e8acb90dd19 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 20:23:35 +0800 Subject: [PATCH 48/53] Update CI --- .github/workflows/build_1_20_4_v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml index 47433b4..0d45a57 100644 --- a/.github/workflows/build_1_20_4_v2.yml +++ b/.github/workflows/build_1_20_4_v2.yml @@ -9,8 +9,8 @@ on: permissions: write-all jobs: build: - environment: default runs-on: ubuntu-latest + environment: default steps: - name: Checkout Git Repository @@ -59,6 +59,6 @@ jobs: - name: Push to Api if: "!contains(github.event.commits[0].message, '[release-skip]')" env: - secret_v2: ${{ vars.API_KEY }} + secret_v2: ${{ secrets.API_KEY }} tag: ${{ env.tag }} run: sh scripts/PushToAPI.sh From 5fdb14947b6c90908b80a9ca65a83fcd4542df44 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 20:34:39 +0800 Subject: [PATCH 49/53] Update CI --- .github/workflows/{build_1_20_4.yml_no => build_1_20_4.yml_dis} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build_1_20_4.yml_no => build_1_20_4.yml_dis} (100%) diff --git a/.github/workflows/build_1_20_4.yml_no b/.github/workflows/build_1_20_4.yml_dis similarity index 100% rename from .github/workflows/build_1_20_4.yml_no rename to .github/workflows/build_1_20_4.yml_dis From 705170d111d562a0c2057686ec1ecf95ff641bfa Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 20:48:27 +0800 Subject: [PATCH 50/53] Update CI --- scripts/PushToAPI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 1540db9..24114c8 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -21,4 +21,4 @@ ctime=$(date -u +"%s")"000" # v2 echo "Authentication: $secret_v2" echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" -curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" \ No newline at end of file +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" From 9f0574db9f67660fab68d134bf9ca98a0a54a738 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 21:14:15 +0800 Subject: [PATCH 51/53] Update CI --- scripts/PushToAPI.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 24114c8..84fc9cc 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -18,6 +18,7 @@ changes=$(git log -1 --pretty='[{"commit": "%H", "message": "%s", "summary": "%b jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_name="luminol-1.20.4-paperclip.jar" ctime=$(date -u +"%s")"000" + # v2 echo "Authentication: $secret_v2" echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" From 3b838086e9b29b5ff5a9edeacce72b3744487117 Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 21:26:42 +0800 Subject: [PATCH 52/53] Update CI --- scripts/PushToAPI.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 84fc9cc..088dbf4 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -21,5 +21,5 @@ ctime=$(date -u +"%s")"000" # v2 echo "Authentication: $secret_v2" -echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" -curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" --header "Content-Type: application/json" --header "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" +echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" From cc593b53e2bfe1bfa9ec242db3cedd6819c994bb Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 21:40:57 +0800 Subject: [PATCH 53/53] Update CI --- scripts/PushToAPI.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 088dbf4..0656fa7 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -21,5 +21,5 @@ ctime=$(date -u +"%s")"000" # v2 echo "Authentication: $secret_v2" -echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" -curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authentication: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" +echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"