feat: code
This commit is contained in:
51
.gitea/workflows/publish.yaml
Normal file
51
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Build Mineroo Network
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ "v*" ]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build-all:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# 1. 检出代码
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 2. 设置 JDK 环境
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle' # 开启缓存,加速多模块构建
|
||||
|
||||
# 3. 赋予 Gradle 执行权限
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
# 4. 执行全量构建
|
||||
- name: Build All Modules
|
||||
run: ./gradlew clean build shadowJar -x test --parallel
|
||||
|
||||
# 5. 整理构建产物 (可选,但推荐)
|
||||
- name: Collect Artifacts
|
||||
run: |
|
||||
mkdir dist
|
||||
|
||||
find velocity/build/libs -name "*.jar" -exec cp {} dist/ \;
|
||||
|
||||
# find paper/build/libs -name "*.jar" -exec cp {} dist/ \;
|
||||
# find fabric/build/libs -name "*.jar" -exec cp {} dist/ \;
|
||||
|
||||
echo "Collected artifacts:"
|
||||
ls -l dist/
|
||||
|
||||
# 6. 上传所有 Jar 包
|
||||
- name: Upload All Plugins
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mineroo-plugins
|
||||
path: dist/*.jar
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user