changelog/.drone.yml
John Olheiser b707352bf9 CI and Linter (#27)
Add S3 for master/releases

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Move to arm64 for more RAM

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Add lint to CI

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Rename default to compliance and un-test releases

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Initial work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/changelog/pulls/27
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@noreply.gitea.io>
2020-01-26 03:43:05 +00:00

129 lines
2.3 KiB
YAML

---
kind: pipeline
name: compliance
platform:
os: linux
arch: arm64
trigger:
event:
- pull_request
steps:
- name: build
pull: always
image: golang:1.13
environment:
GOPROXY: https://goproxy.cn,direct
commands:
- go test -race ./...
- go build
- name: check
pull: always
image: golang:1.13
environment:
GOPROXY: https://goproxy.cn,direct
commands:
- make lint
- name: discord
pull: always
image: appleboy/drone-discord:1
environment:
DISCORD_WEBHOOK_ID:
from_secret: discord_webhook_id
DISCORD_WEBHOOK_TOKEN:
from_secret: discord_webhook_token
when:
event:
- push
- tag
status:
- changed
- failure
---
kind: pipeline
name: release
platform:
os: linux
arch: amd64
trigger:
branch:
- master
event:
- push
- tag
steps:
- name: fetch-tags
pull: always
image: docker:git
commands:
- git fetch --tags --force
- name: release
pull: always
image: techknowlogick/xgo:latest
environment:
GOPROXY: https://goproxy.cn,direct
commands:
- export PATH=$PATH:$GOPATH/bin
- make release
- name: bucket-master
pull: always
image: plugins/s3:1
settings:
acl: public-read
bucket: releases
endpoint: https://storage.gitea.io
path_style: true
source: "dist/*"
strip_prefix: dist/
target: /changelog-tool/master
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
when:
event:
- push
- name: bucket-tag
pull: always
image: plugins/s3:1
settings:
acl: public-read
bucket: releases
endpoint: https://storage.gitea.io
path_style: true
source: "dist/*"
strip_prefix: dist/
target: "/changelog-tool/${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: gitea
pull: always
image: plugins/gitea-release:1
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.com
files:
- "dist/*"
when:
event:
- tag