2020-01-19 12:25:03 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2020-01-26 03:43:05 +00:00
|
|
|
name: compliance
|
2020-01-19 12:25:03 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
2020-01-26 03:43:05 +00:00
|
|
|
arch: arm64
|
2020-01-19 12:25:03 +00:00
|
|
|
|
2020-01-26 03:43:05 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
2020-01-19 12:25:03 +00:00
|
|
|
|
2020-01-26 03:43:05 +00:00
|
|
|
steps:
|
2020-01-19 12:25:03 +00:00
|
|
|
- name: build
|
|
|
|
pull: always
|
2022-06-22 01:27:24 +00:00
|
|
|
image: golang:1.18
|
2020-01-19 12:25:03 +00:00
|
|
|
environment:
|
2022-06-22 01:27:24 +00:00
|
|
|
GOPROXY: https://goproxy.io,direct
|
2020-01-19 12:25:03 +00:00
|
|
|
commands:
|
2020-01-26 03:43:05 +00:00
|
|
|
- go test -race ./...
|
|
|
|
- go build
|
|
|
|
|
|
|
|
- name: check
|
|
|
|
pull: always
|
2022-06-22 01:27:24 +00:00
|
|
|
image: golang:1.18
|
2020-01-26 03:43:05 +00:00
|
|
|
environment:
|
2022-06-22 01:27:24 +00:00
|
|
|
GOPROXY: https://goproxy.io,direct
|
2020-01-26 03:43:05 +00:00
|
|
|
commands:
|
|
|
|
- make lint
|
2020-01-19 12:25:03 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2020-01-26 03:43:05 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: release
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2020-01-19 12:25:03 +00:00
|
|
|
trigger:
|
|
|
|
branch:
|
2020-01-26 03:43:05 +00:00
|
|
|
- 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:
|
2022-06-22 01:27:24 +00:00
|
|
|
GOPROXY: https://goproxy.io,direct
|
2020-01-26 03:43:05 +00:00
|
|
|
commands:
|
|
|
|
- export PATH=$PATH:$GOPATH/bin
|
|
|
|
- make release
|
|
|
|
|
|
|
|
- name: bucket-master
|
|
|
|
pull: always
|
2021-10-08 18:57:05 +00:00
|
|
|
image: woodpeckerci/plugin-s3:latest
|
2020-01-26 03:43:05 +00:00
|
|
|
settings:
|
|
|
|
acl: public-read
|
2021-10-08 18:57:05 +00:00
|
|
|
bucket: gitea-artifacts
|
2022-03-10 21:02:27 +00:00
|
|
|
endpoint: https://ams3.digitaloceanspaces.com
|
2020-01-26 19:43:59 +00:00
|
|
|
source: "dist/release/*"
|
|
|
|
strip_prefix: dist/release/
|
2020-01-26 03:43:05 +00:00
|
|
|
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
|
2021-10-08 18:57:05 +00:00
|
|
|
image: woodpeckerci/plugin-s3:latest
|
2020-01-26 03:43:05 +00:00
|
|
|
settings:
|
|
|
|
acl: public-read
|
2021-10-08 18:57:05 +00:00
|
|
|
bucket: gitea-artifacts
|
2022-03-10 21:02:27 +00:00
|
|
|
endpoint: https://ams3.digitaloceanspaces.com
|
2020-01-26 19:43:59 +00:00
|
|
|
source: "dist/release/*"
|
|
|
|
strip_prefix: dist/release/
|
2020-01-26 03:43:05 +00:00
|
|
|
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:
|
2020-01-27 02:52:04 +00:00
|
|
|
- "dist/release/*"
|
2020-01-26 03:43:05 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|