mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Init 1.21.5 setup
This commit is contained in:
38
.github/workflows/auto-update.yml
vendored
38
.github/workflows/auto-update.yml
vendored
@@ -1,9 +1,9 @@
|
||||
name: Automatically update Gale commit hash
|
||||
name: Automatically update Paper commit hash
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 1 * * *"
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -15,32 +15,32 @@ jobs:
|
||||
path: 'Leaf'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout Gale repository
|
||||
- name: Checkout Paper repository
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
path: 'Gale'
|
||||
repository: "Dreeam-qwq/Gale"
|
||||
path: 'Paper'
|
||||
repository: "PaperMC/Paper"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get Gale latest commit Hash
|
||||
id: galeCommit
|
||||
- name: Get Paper latest commit Hash
|
||||
id: paperCommit
|
||||
run: |
|
||||
cd Gale
|
||||
echo "galeCommit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
cd Paper
|
||||
echo "paperCommit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Leaf Current Gale commit Hash
|
||||
id: currGaleRef
|
||||
- name: Get Leaf Current Paper commit Hash
|
||||
id: currPaperCommit
|
||||
run: |
|
||||
cd Leaf
|
||||
currGaleRef=$(grep "^galeCommit\s*=" gradle.properties | sed 's/^galeCommit\s*=\s*//')
|
||||
echo "currGaleRef=$currGaleRef" >> $GITHUB_OUTPUT
|
||||
currPaperCommit=$(grep "^paperCommit\s*=" gradle.properties | sed 's/^paperCommit\s*=\s*//')
|
||||
echo "currPaperCommit=$currPaperCommit" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update galeCommit in Leaf
|
||||
- name: Update paperCommit in Leaf
|
||||
run: |
|
||||
cd Leaf
|
||||
sed -i "s/\(galeCommit\s*=\s*\).*/\1$PAPER_REF/" gradle.properties
|
||||
sed -i "s/\(paperCommit\s*=\s*\).*/\1$PAPER_COMMIT/" gradle.properties
|
||||
env:
|
||||
PAPER_REF: ${{ steps.galeCommit.outputs.galeCommit }}
|
||||
PAPER_COMMIT: ${{ steps.paperCommit.outputs.paperCommit }}
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: |
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
echo "Running tests...."
|
||||
./gradlew applyAllPatches
|
||||
./gradlew build -x test
|
||||
./gradlew rebuildGalePatches
|
||||
./gradlew rebuildPaperPatches
|
||||
./gradlew rebuildAllServerPatches
|
||||
fi
|
||||
|
||||
@@ -72,10 +72,10 @@ jobs:
|
||||
echo "Writing to repo....."
|
||||
git add .
|
||||
chmod +x ./scripts/upstreamCommit.sh
|
||||
./scripts/upstreamCommit.sh --gale $CURR_GALE_REF
|
||||
./scripts/upstreamCommit.sh --paper $CURR_PAPER_COMMIT
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit."
|
||||
fi
|
||||
env:
|
||||
CURR_GALE_REF: ${{ steps.currGaleRef.outputs.currGaleRef }}
|
||||
CURR_PAPER_COMMIT: ${{ steps.currPaperCommit.outputs.currPaperCommit }}
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Build Leaf 1.21.4
|
||||
name: Build Leaf 1.21.5
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.21.4" ]
|
||||
branches: [ "ver/1.21.5" ] # no build until update finished
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -95,13 +95,13 @@ jobs:
|
||||
|
||||
- name: Rename Paperclip JARs
|
||||
run: |
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.4-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.4-${{ env.BUILD_NUMBER }}-mojmap.jar
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.4-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar
|
||||
|
||||
- name: Upload Leaf as build artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: Leaf 1.21.4
|
||||
path: ./leaf-1.21.4-*.jar
|
||||
name: Leaf 1.21.5
|
||||
path: ./leaf-1.21.5-*.jar
|
||||
|
||||
- name: Prepare release notes and artifacts
|
||||
run: |
|
||||
@@ -122,11 +122,11 @@ jobs:
|
||||
- name: Release Leaf
|
||||
uses: softprops/action-gh-release@master
|
||||
with:
|
||||
name: "Leaf 1.21.4"
|
||||
tag_name: "ver-1.21.4"
|
||||
files: "./leaf-1.21.4-${{ env.BUILD_NUMBER }}.jar"
|
||||
name: "Leaf 1.21.5"
|
||||
tag_name: "ver-1.21.5"
|
||||
files: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar"
|
||||
body_path: "./release_notes.md"
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
target_commitish: "${{ github.sha }}"
|
||||
draft: false
|
||||
prerelease: false
|
||||
prerelease: true
|
||||
8
.github/workflows/build-pr.yml
vendored
8
.github/workflows/build-pr.yml
vendored
@@ -2,7 +2,7 @@ name: Build Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "ver/1.21.4" ]
|
||||
branches: [ "ver/1.21.5" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -35,9 +35,9 @@ jobs:
|
||||
|
||||
- name: Rename Paperclip JARs
|
||||
run: |
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.4-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.4-mojmap.jar
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.5.jar
|
||||
- name: Upload Leaf as build artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: Leaf 1.21.4
|
||||
path: ./leaf-1.21.4-*.jar
|
||||
name: Leaf 1.21.5
|
||||
path: ./leaf-1.21.5.jar
|
||||
|
||||
Reference in New Issue
Block a user