mirror of
				https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
				synced 2025-10-31 16:58:54 +08:00 
			
		
		
		
	- 在 .gitlab-ci.main.yml 和 .gitlab-ci.test.yml 文件中添加了授予 gradlew 执行权限的步骤 - 确保在 main 和 test 分支上执行 CI/CD 流程时,gradlew 脚本具有必要的执行权限 - 提高了构建流程的可靠性和一致性
		
			
				
	
	
		
			27 lines
		
	
	
		
			486 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			486 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| stages:
 | |
|   - build
 | |
|   - publish
 | |
| 
 | |
| # 🧪 test 构建
 | |
| build:
 | |
|   stage: build
 | |
|   rules:
 | |
|     - if: '$CI_COMMIT_BRANCH == "test"'
 | |
|   script:
 | |
|     - ./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
 |