1. 更新gitlab-ci流水线配置

This commit is contained in:
黄昕 2024-03-14 09:58:32 +08:00
parent dbec3b91e4
commit be5f781a7a
1 changed files with 15 additions and 12 deletions

View File

@ -1,10 +1,10 @@
stages : stages :
- compile - compile
- package - package
- release - release
# 编译 # 编译
compile : compile :
stage : compile stage : compile
tags : tags :
- linux-maven - linux-maven
@ -16,7 +16,7 @@ compile :
# 打包 # 打包
package : package :
stage : package stage : package
tags : tags :
- linux-maven - linux-maven
@ -28,14 +28,17 @@ package :
# 发布 # 发布
release_job: release_job:
stage: release stage : release
image: registry.gitlab.com/gitlab-org/release-cli:latest image : registry.gitlab.com/gitlab-org/release-cli:latest
tags: tags :
- linux-maven - linux-maven
rules: rules :
- if: $CI_COMMIT_TAG # Run this job when a tag is created - if : $CI_COMMIT_TAG # Run this job when a tag is created
script: when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
script :
- echo "running release_job" - echo "running release_job"
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
tag_name: '$CI_COMMIT_TAG' tag_name : '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG' name : 'Release $CI_COMMIT_TAG'
description: './CHANGELOG.md'