Skip to content

update ci

update ci #6

name: LightingLuminol 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
environment: default
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 "[email protected]"
git config --global user.name "LightingLuminol CI"
- name: Apply Patches
run: ./gradlew applyPatches
- name: Build
run: ./gradlew createReobfBundlerJar createReobfPaperclipJar
- uses: "actions/upload-artifact@v3"
with:
name: "LightingLuminol CI Artifacts"
path: "build/libs/*.jar"
- name: Rename jar file
run: |
mv build/libs/LightingLuminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/lightingluminol-1.20.4-bundler.jar
mv build/libs/LightingLuminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/lightingluminol-1.20.4-paperclip.jar
- name: setenv
run: |
sh scripts/SetENV.sh
echo "${{ env.tag }}"
- name: Create Release
if: "!contains(github.event.commits[0].message, '[release-skip]')"
uses: ncipollo/[email protected]
with:
tag: ${{ env.tag }}
name: LightingLuminol ${{ env.mcversion }} - ${{ env.commitid }}
body: |
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commitid }} [![download](https://img.shields.io/github/downloads/LuminolMC/LightingLuminol/${{ env.tag }}/total?color=0)](https://github.com/LeavesMC/LuminolMC/LightingLuminol/download/${{ env.tag }}/lightingluminol-1.20.4-paperclip.jar)
This release is automatically compiled by GitHub Actions
artifacts: |
build/libs/lightingluminol-1.20.4-bundler.jar
build/libs/lightingluminol-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