armbian-router/.drone.yml

68 lines
1.5 KiB
YAML

kind: pipeline
name: default
type: docker
steps:
- name: test
image: golang:alpine
volumes:
- name: build
path: /build
commands:
- go mod download
- go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
- ginkgo --randomize-all --p --cover --coverprofile=cover.out .
- go tool cover -func=cover.out
environment:
CGO_ENABLED: '0'
- name: build
image: tystuyfzand/goc:latest
volumes:
- name: build
path: /build
commands:
- mkdir -p /build
- go mod download
- export CGO_ENABLED=0
- goc -o /build/dlrouter
environment:
GOOS: linux,windows,darwin
GOARCH: 386,amd64,arm,arm64
depends_on: [ test ]
- name: release
image: plugins/gitea-release
volumes:
- name: build
path: /build
settings:
api_key:
from_secret: gitea_token
base_url: https://git.meow.tf
title: release
files:
- /build/dlrouter_*
checksum:
- md5
- sha1
- sha256
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
when:
event: tag
depends_on: [ build ]
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.meow.tf/tyler/armbian-router
registry: registry.meow.tf
depends_on: [ test ]
when:
event: tag
volumes:
- name: build
temp: {}