Skip to content

Commit

Permalink
add build-release.yml for Gitee Go
Browse files Browse the repository at this point in the history
 created_at: 2020-11-02 16:47:44
  • Loading branch information
vouv authored and gitee-org committed Nov 2, 2020
1 parent 0150605 commit 02bf719
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .workflow/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ========================================================
# Golang 构建参考流水线样例
# 功能:构建一个简单的 Go 程序并编译不同操作系统下的可执行环境
# ========================================================
name: build-deploy-release # 定义一个唯一 ID 标识为 gitee-go-golang-example,名称为 “Golang-流水线示例” 的流水线
displayName: '新版本发布'
triggers: # 流水线触发器配置
push: # 设置 master 分支 在产生代码 push 时精确触发(PRECISE)构建
- matchType: PRECISE
branch: master
commitMessage: '' # 通过匹配当前提交的 CommitMessage 决定是否执行流水线
stages: # 构建阶段配置
- stage: # 定义一个 ID 标识为 golang-build-stage,名为 “Golang Stage” 的阶段
name: golang-build
displayName: '编译'
failFast: false # 允许快速失败,即当 Stage 中有任务失败时,直接结束整个 Stage
steps: # 构建步骤配置
- step: golangbuild@1 # 采用 Golang 编译环境
name: golang-build # 定义一个 ID 标识为 golang-build ,名为 “编译” 的阶段
displayName: '编译'
inputs: # 构建输入参数设定
golangVersion: 1.15 # 指定 Golang 环境版本为 1.15
goals: | # 示例脚本:创建并编译构建程序
go mod vendor
make deploy

0 comments on commit 02bf719

Please sign in to comment.