mirror of
https://gitea.com/gitea/tea
synced 2024-10-31 21:20:23 +00:00
0b8be54186
This updates drone CI to use the new main branch name `main`. ### ⚠️ breaking The download URLs on https://dl.gitea.io/tea/master will no longer be updated. @Owners: is there a way to add a redirect for these URLs from `/tea/master` to `/tea/main`? Co-authored-by: Norwin <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/495 Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
200 lines
3.8 KiB
YAML
200 lines
3.8 KiB
YAML
---
|
|
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
|
|
|
|
- name: build
|
|
pull: always
|
|
image: golang:1.18
|
|
environment:
|
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
|
commands:
|
|
- make clean
|
|
- make vet
|
|
- make lint
|
|
- make fmt-check
|
|
- make misspell-check
|
|
- make build
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
- pull_request
|
|
|
|
- name: unit-test
|
|
image: golang:1.18
|
|
commands:
|
|
- make unit-test-coverage
|
|
settings:
|
|
group: test
|
|
environment:
|
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
- name: release-test
|
|
image: golang:1.18
|
|
commands:
|
|
- make test
|
|
settings:
|
|
group: test
|
|
environment:
|
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
|
when:
|
|
branch:
|
|
- "release/*"
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
- name: tag-test
|
|
pull: always
|
|
image: golang:1.18
|
|
commands:
|
|
- make test
|
|
settings:
|
|
group: test
|
|
environment:
|
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: static
|
|
image: golang:1.18
|
|
environment:
|
|
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
|
|
commands:
|
|
- 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: 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: "/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: woodpeckerci/plugin-s3:latest
|
|
settings:
|
|
acl: public-read
|
|
bucket: gitea-artifacts
|
|
endpoint: https://ams3.digitaloceanspaces.com
|
|
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: woodpeckerci/plugin-s3:latest
|
|
settings:
|
|
acl: public-read
|
|
bucket: gitea-artifacts
|
|
endpoint: https://ams3.digitaloceanspaces.com
|
|
source: "dist/release/*"
|
|
strip_prefix: dist/release/
|
|
target: /tea/main
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: aws_access_key_id
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: aws_secret_access_key
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|
|
- name: gitea
|
|
pull: always
|
|
image: plugins/gitea-release:1
|
|
settings:
|
|
files:
|
|
- "dist/release/*"
|
|
base_url: https://gitea.com
|
|
api_key:
|
|
from_secret: gitea_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
|