mirror of
				https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
				synced 2025-10-31 19:02:08 +08:00 
			
		
		
		
	- 修改 main 分支的 tag、publish 和 mirror-to-github 阶段规则,排除 ci:、chore: 和 [no-publish] 前缀的提交 - 更新 test 分支的 publish 阶段规则,仅在 push 或 merge_request_event事件时触发
		
			
				
	
	
		
			20 lines
		
	
	
		
			575 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			575 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| stages:
 | |
|   - publish
 | |
| 
 | |
| # 🧪 test 发布 SNAPSHOT 包(允许覆盖)
 | |
| publish:
 | |
|   stage: publish
 | |
|   rules:
 | |
|     - if: '$CI_COMMIT_BRANCH == "test" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
 | |
|   script:
 | |
|     - echo "🔧 授予 gradlew 执行权限..."
 | |
|     - chmod +x gradlew
 | |
|     # 强制刷新 SNAPSHOT 缓存并发布
 | |
|     - ./gradlew clean publishMavenJavaPublicationToGitLabRepository \
 | |
|       --no-daemon \
 | |
|       --refresh-dependencies \
 | |
|       -Porg.gradle.caching=false \
 | |
|       -Dorg.gradle.configuration-cache=false
 | |
|   tags:
 | |
|     - java
 |