forgeboot/.gitlab/workflows/.gitlab-ci.test.yml
gewuyou 210aad575b ci:优化代码仓库克隆和测试流程
- 移除 git clone 命令中的 --depth=1 参数,保留完整历史记录
- 为 gradlew 添加执行权限,确保测试流程顺利进行
2025-07-16 18:46:02 +08:00

29 lines
558 B
YAML

stages:
- build
- publish
# 🧪 test 构建
build:
stage: build
rules:
- if: '$CI_COMMIT_BRANCH == "test"'
script:
- echo "🔧 授予 gradlew 执行权限..."
- chmod +x gradlew
- ./gradlew clean build
tags:
- java
# 🧪 test 发布 SNAPSHOT 包(允许覆盖)
publish:
stage: publish
needs: ["build"]
rules:
- if: '$CI_COMMIT_BRANCH == "test"'
script:
- echo "🔧 授予 gradlew 执行权限..."
- chmod +x gradlew
- ./gradlew publishMavenJavaPublicationToGitLabRepository
tags:
- java