Update CI
This commit is contained in:
@@ -8,10 +8,10 @@
|
|||||||
name: LuminolCI - Ver/1.20.4
|
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
|
||||||
|
|
||||||
15
.github/workflows/build_1_20_4_v2.yml
vendored
15
.github/workflows/build_1_20_4_v2.yml
vendored
@@ -31,27 +31,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: "Luminol CI Artifacts"
|
name: "Luminol CI Artifacts"
|
||||||
path: "build/libs/*.jar"
|
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
|
- name: Rename jar file
|
||||||
run: |
|
run: |
|
||||||
mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar
|
mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar
|
||||||
mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar
|
mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar
|
||||||
- name: Get and Set ENV
|
- name: Set ENV
|
||||||
run: sh scripts/GetSetENV.sh
|
run: sh scripts/SetENV.sh
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: "!contains(github.event.commits[0].message, '[release-skip]')"
|
if: "!contains(github.event.commits[0].message, '[release-skip]')"
|
||||||
uses: ncipollo/release-action@v1.12.0
|
uses: ncipollo/release-action@v1.12.0
|
||||||
with:
|
with:
|
||||||
tag: ${{ env.tag }}
|
tag: ${{ env.tag }}
|
||||||
name: Luminol ${{ env.version }} - ${{ env.sha_short }}
|
name: Luminol ${{ env.version }} - ${{ env.commitid }}
|
||||||
body: |
|
body: |
|
||||||
📦Version: `${{ env.version }}` | Commit ${{ env.sha_short }} [](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar)
|
📦Version: `${{ env.version }}` | Commit ${{ env.commitid }} [](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar)
|
||||||
This release is automatically compiled by GitHub Actions
|
This release is automatically compiled by GitHub Actions
|
||||||
artifacts: |
|
artifacts: |
|
||||||
build/libs/luminol-1.20.4-bundler.jar
|
build/libs/luminol-1.20.4-bundler.jar
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ prop() {
|
|||||||
}
|
}
|
||||||
echo "$tag"
|
echo "$tag"
|
||||||
project_id="luminol"
|
project_id="luminol"
|
||||||
project_name="uminol"
|
project_name="luminol"
|
||||||
mcversion=$(prop mcVersion)
|
mcversion=$(prop mcVersion)
|
||||||
ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
pre=$(prop preVersion)
|
pre=$(prop preVersion)
|
||||||
@@ -18,7 +18,7 @@ else
|
|||||||
fi
|
fi
|
||||||
promoted=false
|
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')
|
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_name="build/libs/luminol-1.20.4-paperclip.jar"
|
||||||
jar_sha256=`sha256 $jar_name`
|
jar_sha256=`sha256 $jar_name`
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ release_tag="$mcversion-$commitid"
|
|||||||
jarName="build/libs/luminol-1.20.4-paperclip.jar"
|
jarName="build/libs/luminol-1.20.4-paperclip.jar"
|
||||||
make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true")
|
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 "tag=$release_tag" >> $GITHUB_ENV
|
||||||
echo "jar=$jarName" >> $GITHUB_ENV
|
echo "jar=$jarName" >> $GITHUB_ENV
|
||||||
echo "pre=$preVersion" >> $GITHUB_ENV
|
echo "pre=$preVersion" >> $GITHUB_ENV
|
||||||
Reference in New Issue
Block a user