|
|
|
|
@@ -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:
|
|
|
|
|
@@ -35,49 +31,28 @@ 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: 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: Release Artifacts
|
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
|
- 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:
|
|
|
|
|
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 }} [](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 ${{ env.version }} - ${{ env.commitid }}
|
|
|
|
|
body: |
|
|
|
|
|
📦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
|
|
|
|
|
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:
|
|
|
|
|
|