Compare commits
15 Commits
dev/1.21.1
...
1.20.4-752
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75266cceed | ||
|
|
8a292a655a | ||
|
|
a0779956f1 | ||
|
|
1de9ca9d5f | ||
|
|
bc842c855a | ||
|
|
120ddafc2f | ||
|
|
3b1a8cc929 | ||
|
|
2914a219e2 | ||
|
|
07bbbd3d7e | ||
|
|
e69cf4c9ec | ||
|
|
6b679bc02e | ||
|
|
124a240fe9 | ||
|
|
e8b9aaee48 | ||
|
|
eb3502eb86 | ||
|
|
bdd41593e0 |
6
.github/workflows/build_1_20_4.yml
vendored
6
.github/workflows/build_1_20_4.yml
vendored
@@ -9,9 +9,9 @@ name: LuminolCI - Ver/1.20.4
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "ver/1.20.4" ]
|
# branches: [ "ver/1.20.4" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "ver/1.20.4" ]
|
# branches: [ "ver/1.20.4" ]
|
||||||
|
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
- name: Build project to paperclip jar
|
- name: Build project to paperclip jar
|
||||||
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
|
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
|
||||||
with:
|
with:
|
||||||
arguments: createReobfPaperclipJar
|
arguments: createReobfBundlerJar createReobfPaperclipJar
|
||||||
- name: Capture build artifacts
|
- name: Capture build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
70
.github/workflows/build_1_20_4_v2.yml
vendored
Normal file
70
.github/workflows/build_1_20_4_v2.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
name: Luminol CI v2 - Ver/1.20.4
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "ver/1.20.4" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "ver/1.20.4" ]
|
||||||
|
# workflow_dispatch:
|
||||||
|
permissions: write-all
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Git Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- 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 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 }} [](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:
|
||||||
|
secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }}
|
||||||
|
tag: ${{ env.tag }}
|
||||||
|
run: sh scripts/PushToAPI.sh
|
||||||
@@ -74,3 +74,4 @@ QQ群: [368632360](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=MfosKhcDd8Fdxn1MREu
|
|||||||
<img alt="Star历史表" src="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
<img alt="Star历史表" src="https://api.star-history.com/svg?repos=LuminolMC/Luminol%2CLuminolMC/LightingLuminol&type=Date" />
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,5 @@ org.gradle.caching = true
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.vfs.watch = false
|
org.gradle.vfs.watch = false
|
||||||
org.gradle.jvmargs = -Xmx3G
|
org.gradle.jvmargs = -Xmx3G
|
||||||
|
mcVersion=1.20.4
|
||||||
|
preVersion=false
|
||||||
15
scripts/GetSetENV.sh
Normal file
15
scripts/GetSetENV.sh
Normal file
@@ -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
|
||||||
@@ -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/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\"}"
|
||||||
Reference in New Issue
Block a user