drone 1 format
This commit is contained in:
73
.drone.yml
73
.drone.yml
@@ -1,60 +1,59 @@
|
|||||||
workspace:
|
kind: pipeline
|
||||||
base: /go
|
name: default
|
||||||
path: src/gitbase.de/apairon/mark2web
|
|
||||||
|
|
||||||
|
steps:
|
||||||
pipeline:
|
- name: build for linux
|
||||||
build_mark2web_linux:
|
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
environment:
|
environment:
|
||||||
- CGO_ENABLED=0
|
CGO_ENABLED: 0
|
||||||
- GOOS=linux
|
GOOS: linux
|
||||||
- GOARCH=amd64
|
GOARCH: amd64
|
||||||
commands:
|
commands:
|
||||||
|
- git submodule update --init --recursive
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
|
|
||||||
test_example:
|
- name: test with example content
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- ./dist/mark2web-`cat VERSION`-linux-amd64 -version
|
- ./dist/mark2web-`cat VERSION`-linux-amd64 -version
|
||||||
- ./dist/mark2web-`cat VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug
|
- ./dist/mark2web-`cat VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug
|
||||||
|
|
||||||
build_mark2web_freebsd:
|
- name: build for freebsd
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
environment:
|
environment:
|
||||||
- CGO_ENABLED=0
|
CGO_ENABLED: 0
|
||||||
- GOOS=freebsd
|
GOOS: freebsd
|
||||||
- GOARCH=amd64
|
GOARCH: amd64
|
||||||
commands:
|
commands:
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ tag ]
|
||||||
|
|
||||||
build_mark2web_darwin:
|
- name: build for macos
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
environment:
|
environment:
|
||||||
- CGO_ENABLED=0
|
CGO_ENABLED: 0
|
||||||
- GOOS=darwin
|
GOOS: darwin
|
||||||
- GOARCH=amd64
|
GOARCH: amd64
|
||||||
commands:
|
commands:
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ tag ]
|
||||||
|
|
||||||
build_mark2web_windows:
|
- name: build for windows
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
environment:
|
environment:
|
||||||
- CGO_ENABLED=0
|
CGO_ENABLED: 0
|
||||||
- GOOS=windows
|
GOOS: windows
|
||||||
- GOARCH=amd64
|
GOARCH: amd64
|
||||||
- FILEEXT=.exe
|
FILEEXT: .exe
|
||||||
commands:
|
commands:
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ tag ]
|
||||||
|
|
||||||
build_docker:
|
- name: build docker image
|
||||||
image: docker
|
image: docker
|
||||||
commands:
|
commands:
|
||||||
- cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web
|
- cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web
|
||||||
@@ -65,7 +64,7 @@ pipeline:
|
|||||||
branch: [ master ]
|
branch: [ master ]
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
|
|
||||||
deploy_website:
|
- name: deploy website
|
||||||
image: apairon/mark2web:latest
|
image: apairon/mark2web:latest
|
||||||
commands:
|
commands:
|
||||||
- /mark2web -version
|
- /mark2web -version
|
||||||
@@ -74,7 +73,7 @@ pipeline:
|
|||||||
branch: [ master ]
|
branch: [ master ]
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
|
|
||||||
prepare_release:
|
- name: prepare release
|
||||||
image: apairon/mark2web:latest
|
image: apairon/mark2web:latest
|
||||||
commands:
|
commands:
|
||||||
- gzip dist/*
|
- gzip dist/*
|
||||||
@@ -82,16 +81,18 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ tag ]
|
||||||
|
|
||||||
gitea_relase:
|
- name: gitea release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
secrets: [ plugin_api_key ]
|
settings:
|
||||||
base_url: https://gitbase.de
|
api_key:
|
||||||
files:
|
from_secret: gitea_token
|
||||||
- dist/*
|
base_url: https://gitbase.de
|
||||||
title: VERSION
|
files:
|
||||||
note: RELEASE
|
- dist/*
|
||||||
checksum:
|
title: VERSION
|
||||||
- md5
|
note: RELEASE
|
||||||
- sha256
|
checksum:
|
||||||
|
- md5
|
||||||
|
- sha256
|
||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ tag ]
|
||||||
|
|||||||
Reference in New Issue
Block a user