mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-03 04:27:21 -05:00
194 lines
3.3 KiB
YAML
194 lines
3.3 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
workspace:
|
|
base: /go
|
|
path: src/code.gitea.io/tea
|
|
|
|
steps:
|
|
- name: build
|
|
pull: always
|
|
image: golang:1.12
|
|
environment:
|
|
GOPROXY: https://goproxy.cn
|
|
commands:
|
|
- make clean
|
|
- make vet
|
|
- make lint
|
|
- make fmt-check
|
|
- make misspell-check
|
|
- make test-vendor
|
|
- make build
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
- pull_request
|
|
|
|
- name: unit-test
|
|
pull: always
|
|
image: golang:1.12
|
|
commands:
|
|
- make unit-test-coverage
|
|
settings:
|
|
group: test
|
|
when:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
- name: release-test
|
|
pull: always
|
|
image: golang:1.12
|
|
commands:
|
|
- make test
|
|
settings:
|
|
group: test
|
|
when:
|
|
branch:
|
|
- "release/*"
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
- name: tag-test
|
|
pull: always
|
|
image: golang:1.12
|
|
commands:
|
|
- make test
|
|
settings:
|
|
group: test
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: static
|
|
pull: always
|
|
image: techknowlogick/xgo:latest
|
|
commands:
|
|
- export PATH=$PATH:$GOPATH/bin
|
|
- make release
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
- name: gpg-sign
|
|
pull: always
|
|
image: plugins/gpgsign:1
|
|
settings:
|
|
detach_sign: true
|
|
excludes:
|
|
- "dist/release/*.sha256"
|
|
files:
|
|
- "dist/release/*"
|
|
environment:
|
|
GPGSIGN_KEY:
|
|
from_secret: gpgsign_key
|
|
GPGSIGN_PASSPHRASE:
|
|
from_secret: gpgsign_passphrase
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
- name: tag-release
|
|
pull: always
|
|
image: plugins/s3:1
|
|
settings:
|
|
acl: public-read
|
|
bucket: releases
|
|
endpoint: https://storage.gitea.io
|
|
path_style: true
|
|
source: "dist/release/*"
|
|
strip_prefix: dist/release/
|
|
target: "/tea/${DRONE_TAG##v}"
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: aws_access_key_id
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: aws_secret_access_key
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: release-branch-release
|
|
pull: always
|
|
image: plugins/s3:1
|
|
settings:
|
|
acl: public-read
|
|
bucket: releases
|
|
endpoint: https://storage.gitea.io
|
|
path_style: true
|
|
source: "dist/release/*"
|
|
strip_prefix: dist/release/
|
|
target: "/tea/${DRONE_BRANCH##release/v}"
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: aws_access_key_id
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: aws_secret_access_key
|
|
when:
|
|
branch:
|
|
- "release/*"
|
|
event:
|
|
- push
|
|
|
|
- name: release
|
|
pull: always
|
|
image: plugins/s3:1
|
|
settings:
|
|
acl: public-read
|
|
bucket: releases
|
|
endpoint: https://storage.gitea.io
|
|
path_style: true
|
|
source: "dist/release/*"
|
|
strip_prefix: dist/release/
|
|
target: /tea/master
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: aws_access_key_id
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: aws_secret_access_key
|
|
when:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
- name: github
|
|
pull: always
|
|
image: plugins/gitea-releases:1
|
|
settings:
|
|
files:
|
|
- "dist/release/*"
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: discord
|
|
pull: always
|
|
image: appleboy/drone-discord:1.0.0
|
|
environment:
|
|
DISCORD_WEBHOOK_ID:
|
|
from_secret: discord_webhook_id
|
|
DISCORD_WEBHOOK_TOKEN:
|
|
from_secret: discord_webhook_token
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
- pull_request
|
|
status:
|
|
- changed
|
|
- failure |