Compare commits

..

2 Commits

Author SHA1 Message Date
ShintoKosei
7522e3c67b Update CI 2024-04-06 18:40:49 +08:00
ShintoKosei
71a7127bb1 Update CI 2024-04-06 18:13:22 +08:00
4 changed files with 10 additions and 17 deletions

View File

@@ -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

View File

@@ -31,29 +31,20 @@ jobs:
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: 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 ${{ steps.get_version.outputs.version }} - ${{ steps.short_sha.outputs.sha_short }}
name: Luminol ${{ env.version }} - ${{ env.commitid }}
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.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

View File

@@ -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`

View File

@@ -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