mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
Update Leaf 1.21.7
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
name: Build Leaf 1.21.6
|
||||
name: Build Leaf 1.21.7
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.21.6" ]
|
||||
branches: [ "ver/1.21.7" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -13,12 +13,12 @@ jobs:
|
||||
GRADLE_MEMORY: "-Xmx4g -XX:MaxMetaspaceSize=2g"
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Gradle Cache
|
||||
uses: useblacksmith/cache@v5.0.2
|
||||
uses: useblacksmith/cache@v5
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches/modules-2
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
find ~/.gradle/caches -name "*.lock" -type f -delete || echo "No lock files found"
|
||||
|
||||
- name: Setup java
|
||||
uses: useblacksmith/setup-java@v5.0.1
|
||||
uses: useblacksmith/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
@@ -91,17 +91,17 @@ jobs:
|
||||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
|
||||
|
||||
- name: Upload Leaf
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Leaf 1.21.6
|
||||
path: ./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar
|
||||
name: Leaf 1.21.7
|
||||
path: ./leaf-1.21.7-${{ env.BUILD_NUMBER }}.jar
|
||||
|
||||
- name: Release Leaf
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Leaf 1.21.6"
|
||||
tag_name: "ver-1.21.6"
|
||||
files: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
name: "Leaf 1.21.7"
|
||||
tag_name: "ver-1.21.7"
|
||||
files: "./leaf-1.21.7-${{ env.BUILD_NUMBER }}.jar"
|
||||
body_path: "./release_notes.md"
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
target_commitish: "${{ github.sha }}"
|
||||
@@ -111,21 +111,21 @@ jobs:
|
||||
- name: Calculate SHA-256
|
||||
id: hash
|
||||
run: |
|
||||
FILE_NAME="leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
FILE_NAME="leaf-1.21.7-${{ env.BUILD_NUMBER }}.jar"
|
||||
HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }')
|
||||
echo "sha256=$HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload JAR to download API
|
||||
uses: appleboy/scp-action@v1.0.0
|
||||
uses: appleboy/scp-action@v1
|
||||
with:
|
||||
host: ${{ secrets.API_HOST }}
|
||||
username: ${{ secrets.API_USER }}
|
||||
password: ${{ secrets.API_PASS }}
|
||||
source: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
source: "./leaf-1.21.7-${{ env.BUILD_NUMBER }}.jar"
|
||||
target: "~/api/uploads/"
|
||||
|
||||
- name: Insert build to download API
|
||||
uses: appleboy/ssh-action@v1.2.2
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.API_HOST }}
|
||||
username: ${{ secrets.API_USER }}
|
||||
@@ -141,11 +141,11 @@ jobs:
|
||||
node insertBuild.js \
|
||||
--projectName leaf \
|
||||
--projectFriendlyName "Leaf" \
|
||||
--version 1.21.6 \
|
||||
--versionGroupName 1.21.6 \
|
||||
--versionName 1.21.6 \
|
||||
--version 1.21.7 \
|
||||
--versionGroupName 1.21.7 \
|
||||
--versionName 1.21.7 \
|
||||
--build-number ${{ env.BUILD_NUMBER }} \
|
||||
--repositoryPath "$REPO_DIR" \
|
||||
--storagePath /root/api/storage \
|
||||
--download "primary:/root/api/uploads/leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \
|
||||
--download "primary:/root/api/uploads/leaf-1.21.7-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \
|
||||
--buildChannel default
|
||||
12
.github/workflows/build-pr.yml
vendored
12
.github/workflows/build-pr.yml
vendored
@@ -2,7 +2,7 @@ name: Build Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "ver/1.21.6" ]
|
||||
branches: [ "ver/1.21.7" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup java
|
||||
uses: useblacksmith/setup-java@v5
|
||||
@@ -34,9 +34,9 @@ jobs:
|
||||
|
||||
- name: Rename Paperclip JARs
|
||||
run: |
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.6.jar
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.7-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.7.jar
|
||||
- name: Upload Leaf as build artifact
|
||||
uses: actions/upload-artifact@main
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Leaf 1.21.6
|
||||
path: ./leaf-1.21.6.jar
|
||||
name: Leaf 1.21.7
|
||||
path: ./leaf-1.21.7.jar
|
||||
|
||||
7
.github/workflows/publish-api.yml
vendored
7
.github/workflows/publish-api.yml
vendored
@@ -1,7 +1,8 @@
|
||||
name: Publish API
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.21.6" ]
|
||||
branches: [ "ver/1.21.7" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,12 +12,12 @@ jobs:
|
||||
GRADLE_MEMORY: "-Xmx4g -XX:MaxMetaspaceSize=2g"
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up GraalVM JDK 21
|
||||
uses: graalvm/setup-graalvm@main
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: 21
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
Reference in New Issue
Block a user