fix: 修复有问题的拴绳版本依赖

改了mods.toml上的文件
This commit is contained in:
叁玖领域 2026-03-01 21:17:57 +08:00
parent aa799ae204
commit 027279a2bb
4 changed files with 94 additions and 52 deletions

View File

@ -15,7 +15,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取完整历史用于生成日志
fetch-depth: 0
- name: Setup JDK 21
uses: actions/setup-java@v4
@ -31,13 +31,8 @@ jobs:
- name: Prepare release files
run: |
# 创建发布目录
mkdir -p release-files
# 复制所有 JAR 文件(或根据需要过滤)
cp build/libs/*.jar release-files/ 2>/dev/null || true
# 列出复制的文件
echo "准备发布的文件:"
ls -la release-files/
@ -65,7 +60,7 @@ jobs:
name: release-files
path: ./dist
- name: Generate smart changelog
- name: Generate CZ-compliant changelog
id: generate_changelog
run: |
CURRENT_TAG="${{ github.ref_name }}"
@ -84,69 +79,87 @@ jobs:
echo "" >> $TEMP_FILE
echo "这是项目的第一个正式版本。" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 直接显示最近的提交
git log --pretty=format:"- %s" --reverse --max-count=20 >> $TEMP_FILE
# 获取所有提交并按类型分组
git log --pretty=format:"%s" --reverse | while read -r line; do
echo "- $line" >> $TEMP_FILE
done
else
echo "### 从 $PREV_TAG 到 $CURRENT_TAG 的变更" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 定义提交类型关键词
# 定义符合CZ规范的提交类型映射
declare -A commit_types
commit_types=(
["✨ 新功能"]="^(feat|add|新增|添加|feature|新功能)"
["🐛 修复"]="^(fix|修复|bug|问题|bugfix|repair)"
["🔧 改进"]="^(改进|优化|improve|优化|enhance|refactor|重构|revert|perf)"
["📖 文档"]="^(文档|docs|readme|doc|说明|注释)"
["🧪 测试"]="^(测试|test|单元测试)"
["🚀 发布"]="^(发布|release|版本|tag)"
["🔧 配置"]="^(配置|config|设置|setup|构建|build|ci|cd|chore)"
["🎨 样式"]="^(样式|style|ui|界面|美化)"
["✨ 新功能"]="^(feat|feature)(\(.*\))?:"
["🐛 修复"]="^(fix|bugfix)(\(.*\))?:"
["📝 文档"]="^(docs|documentation)(\(.*\))?:"
["🎨 样式"]="^(style)(\(.*\))?:"
["🔨 重构"]="^(refactor)(\(.*\))?:"
["⚡️ 性能"]="^(perf|performance)(\(.*\))?:"
["✅ 测试"]="^(test)(\(.*\))?:"
["🔧 构建"]="^(build)(\(.*\))?:"
["👷 CI"]="^(ci)(\(.*\))?:"
["📦 依赖"]="^(chore|deps)(\(.*\))?:"
["⏪ 回退"]="^(revert)(\(.*\))?:"
)
# 遍历每种类型
# 获取所有提交
COMMITS=$(git log --pretty=format:"%s" $PREV_TAG..HEAD)
# 处理每种类型的提交
for type_name in "${!commit_types[@]}"; do
pattern="${commit_types[$type_name]}"
echo "#### $type_name" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 使用更灵活的正则匹配
matched_commits=$(git log --pretty=format:"- %s" --regexp-ignore-case --grep="$pattern" $PREV_TAG..HEAD 2>/dev/null || true)
# 提取匹配的提交
matched_commits=$(echo "$COMMITS" | grep -E "$pattern" || true)
if [ -n "$matched_commits" ]; then
echo "$matched_commits" | head -15 >> $TEMP_FILE
else
echo "*(无相关更改)*" >> $TEMP_FILE
echo "#### $type_name" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 处理每条提交提取scope和subject
echo "$matched_commits" | while read -r commit; do
# 解析scope和subject
if [[ $commit =~ ^[a-z]+\((.*)\):\ (.*) ]]; then
scope="${BASH_REMATCH[1]}"
subject="${BASH_REMATCH[2]}"
echo "- **$scope**: $subject" >> $TEMP_FILE
elif [[ $commit =~ ^[a-z]+:\ (.*) ]]; then
subject="${BASH_REMATCH[1]}"
echo "- $subject" >> $TEMP_FILE
else
echo "- $commit" >> $TEMP_FILE
fi
done
echo "" >> $TEMP_FILE
fi
done
# 处理破坏性变更BREAKING CHANGE
breaking_changes=$(git log --pretty=format:"%b" $PREV_TAG..HEAD | grep -i "BREAKING CHANGE" || true)
if [ -n "$breaking_changes" ]; then
echo "#### ⚠️ 破坏性变更" >> $TEMP_FILE
echo "" >> $TEMP_FILE
done
echo "$breaking_changes" | while read -r line; do
echo "- $line" >> $TEMP_FILE
done
echo "" >> $TEMP_FILE
fi
# 显示未分类的提交
echo "#### 📝 其他更改" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 获取所有提交
all_commits=$(git log --pretty=format:"%s" $PREV_TAG..HEAD)
categorized_commits=""
# 收集已分类的提交
# 处理未分类的提交
uncategorized="$COMMITS"
for pattern in "${commit_types[@]}"; do
categorized=$(echo "$all_commits" | grep -E -i "$pattern" || true)
categorized_commits="$categorized_commits"$'\n'"$categorized"
uncategorized=$(echo "$uncategorized" | grep -v -E "$pattern" || true)
done
# 获取未分类的提交
uncategorized=$(echo "$all_commits" | grep -v -F "$categorized_commits" || echo "$all_commits")
if [ -n "$uncategorized" ]; then
echo "#### 📝 其他更改" >> $TEMP_FILE
echo "" >> $TEMP_FILE
echo "$uncategorized" | while read -r commit; do
echo "- $commit" >> $TEMP_FILE
done
else
echo "*(无其他更改)*" >> $TEMP_FILE
echo "" >> $TEMP_FILE
fi
echo "" >> $TEMP_FILE
fi
echo "## 📊 统计信息" >> $TEMP_FILE
@ -170,7 +183,7 @@ jobs:
echo "### 📜 详细提交历史" >> $TEMP_FILE
echo "" >> $TEMP_FILE
# 显示所有提交的详细列表
# 显示所有提交的详细列表包含scope信息
if [ -z "$PREV_TAG" ]; then
git log --pretty=format:"- **%h** %s - %an (%ad)" --date=short --reverse | head -100 >> $TEMP_FILE
else

View File

@ -1,4 +1,33 @@
# 地牢游戏 - 许可证说明
# 地牢游戏
![GitHub Release](https://img.shields.io/github/v/release/3944Realms/EroticDungeonGame) [![License](https://img.shields.io/badge/license-Apache%20License%202.0%20|%20CC%20BY--NC--SA%204.0-green)]()
[![CurseForge Download](https://img.shields.io/curseforge/dt/1445908?logo=curseforge&label=CurseForge)](https://www.curseforge.com/minecraft/mc-mods/dungeon-game)
[![Modrinth Download](https://img.shields.io/modrinth/dt/oaqKSBPT?logo=modrinth&label=Modrinth)](https://modrinth.com/mod/dungeongame)
# 对于开发者
**导入仓库:**
```groovy
repositories {
maven {
name = "LTD Maven"
url = "https://maven.sighs.cc/repository/maven-public/"
}
}
```
**导入依赖**
请自行寻找相关前置依赖
```groovy
dependencies {
implementation("top.r3944realms.eroticdungeongame:eroticdungeongame:1.20.1-26H8")
}
```
# 许可证说明
## 重要声明

View File

@ -44,7 +44,7 @@ mod_name=Erotic Dungeon Game
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=Apache 2.0, CC BY-NC-SA 4.0
# The mod version. See https://semver.org/
mod_version=26H7
mod_version=26H8
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View File

@ -131,7 +131,7 @@ side = "BOTH"
[[dependencies.${mod_id}]]
modId = "superleadrope"
mandatory = false
versionRange = "[1.20.1-1.2.1,)"
versionRange = "[1.2.1,)"
ordering = "AFTER"
side = "BOTH"