1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-11-03 04:27:21 -05:00
tea/.drone.yml

203 lines
3.8 KiB
YAML
Raw Normal View History

2019-07-06 21:40:02 -04:00
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: vendor
pull: always
image: golang:1.18
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
commands:
- make vendor # use vendor folder as cache
2019-07-06 21:40:02 -04:00
- name: build
pull: always
image: golang:1.18
2019-07-06 21:40:02 -04:00
environment:
2022-03-28 17:59:48 -04:00
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
2019-07-06 21:40:02 -04:00
commands:
- make clean
- make vet
- make lint
- make fmt-check
- make misspell-check
- make build
when:
event:
- push
- tag
- pull_request
2019-07-06 21:40:02 -04:00
- name: unit-test
image: golang:1.18
2019-07-06 21:40:02 -04:00
commands:
- make unit-test-coverage
settings:
group: test
2022-03-28 17:59:48 -04:00
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
2019-07-06 21:40:02 -04:00
when:
branch:
- main
2019-07-06 21:40:02 -04:00
event:
- push
- pull_request
2019-07-06 21:40:02 -04:00
- name: release-test
image: golang:1.18
2019-07-06 21:40:02 -04:00
commands:
- make test
settings:
group: test
2022-03-28 17:59:48 -04:00
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
2019-07-06 21:40:02 -04:00
when:
branch:
- "release/*"
event:
- push
- pull_request
2019-07-06 21:40:02 -04:00
- name: tag-test
pull: always
image: golang:1.18
2019-07-06 21:40:02 -04:00
commands:
- make test
settings:
group: test
2022-03-28 17:59:48 -04:00
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
2019-07-06 21:40:02 -04:00
when:
event:
- tag
2019-07-06 21:40:02 -04:00
- name: static
image: golang:1.18
environment:
2022-03-28 17:59:48 -04:00
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
2019-07-06 21:40:02 -04:00
commands:
- make release
when:
event:
- push
- tag
2019-07-06 21:40:02 -04:00
- name: gpg-sign
pull: always
image: plugins/gpgsign:1
settings:
detach_sign: true
excludes:
2019-07-06 21:40:02 -04:00
- "dist/release/*.sha256"
files:
- "dist/release/*"
environment:
GPGSIGN_KEY:
from_secret: gpgsign_key
GPGSIGN_PASSPHRASE:
from_secret: gpgsign_passphrase
when:
event:
- push
- tag
2019-07-06 21:40:02 -04:00
- name: tag-release
pull: always
image: woodpeckerci/plugin-s3:latest
2019-07-06 21:40:02 -04:00
settings:
acl: public-read
bucket: gitea-artifacts
2022-09-13 16:36:45 -04:00
endpoint:
from_secret: aws_endpoint
path_style: true
2019-07-06 21:40:02 -04:00
source: "dist/release/*"
strip_prefix: dist/release/
2019-07-06 21:40:02 -04:00
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
2019-07-06 21:40:02 -04:00
- name: release-branch-release
pull: always
image: woodpeckerci/plugin-s3:latest
2019-07-06 21:40:02 -04:00
settings:
acl: public-read
bucket: gitea-artifacts
2022-09-13 16:36:45 -04:00
endpoint:
from_secret: aws_endpoint
2019-07-06 21:40:02 -04:00
source: "dist/release/*"
strip_prefix: dist/release/
2019-07-06 21:40:02 -04:00
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
2019-07-06 21:40:02 -04:00
- name: release
pull: always
image: woodpeckerci/plugin-s3:latest
2019-07-06 21:40:02 -04:00
settings:
acl: public-read
bucket: gitea-artifacts
2022-09-13 16:36:45 -04:00
endpoint:
from_secret: aws_endpoint
2019-07-06 21:40:02 -04:00
source: "dist/release/*"
strip_prefix: dist/release/
target: /tea/main
2019-07-06 21:40:02 -04:00
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
when:
branch:
- main
2019-07-06 21:40:02 -04:00
event:
- push
- name: gitea
2019-07-06 21:40:02 -04:00
pull: always
2019-11-15 04:33:56 -05:00
image: plugins/gitea-release:1
2019-07-06 21:40:02 -04:00
settings:
files:
2019-07-06 21:40:02 -04:00
- "dist/release/*"
base_url: https://gitea.com
api_key:
from_secret: gitea_token
2019-07-06 21:40:02 -04:00
when:
event:
- tag
2019-07-06 21:40:02 -04:00
- 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