Generate changelog of gitea repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

129 lines
2.4 KiB

---
kind: pipeline
name: compliance
platform:
os: linux
arch: arm64
trigger:
event:
- pull_request
steps:
- name: build
pull: always
image: golang:1.17
environment:
GOPROXY: https://goproxy.cn,direct
commands:
- go test -race ./...
- go build
- name: check
pull: always
image: golang:1.17
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: woodpeckerci/plugin-s3:latest
settings:
acl: public-read
bucket: gitea-artifacts
endpoint: https://storage.gitea.io
path_style: true
source: "dist/release/*"
strip_prefix: dist/release/
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: woodpeckerci/plugin-s3:latest
settings:
acl: public-read
bucket: gitea-artifacts
endpoint: https://storage.gitea.io
path_style: true
source: "dist/release/*"
strip_prefix: dist/release/
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/release/*"
when:
event:
- tag