Update CI

This commit is contained in:
ShintoKosei
2024-04-06 18:40:49 +08:00
committed by GitHub
parent 71a7127bb1
commit 7522e3c67b
4 changed files with 12 additions and 17 deletions

View File

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

View File

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