Compare commits
2 Commits
604ee6ed1b
...
ce9379d166
Author | SHA1 | Date | |
---|---|---|---|
ce9379d166 | |||
ec24497a1c |
83
.drone.yml
83
.drone.yml
@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
name: build linux/amd64
|
||||
steps:
|
||||
- kind: pipeline
|
||||
name: build linux/amd64
|
||||
steps:
|
||||
- commands:
|
||||
- git fetch --tags
|
||||
image: alpine/git
|
||||
@ -13,8 +13,8 @@ steps:
|
||||
name: go test
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64.tar.gz"
|
||||
environment:
|
||||
@ -34,23 +34,22 @@ steps:
|
||||
from_secret: GITEA_API_KEY
|
||||
image: golang:1.22
|
||||
name: upload artifact
|
||||
trigger:
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
type: docker
|
||||
---
|
||||
kind: pipeline
|
||||
name: build windows/amd64
|
||||
steps:
|
||||
type: docker
|
||||
- kind: pipeline
|
||||
name: build windows/amd64
|
||||
steps:
|
||||
- commands:
|
||||
- git fetch --tags
|
||||
image: alpine/git
|
||||
name: fetch tags
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- zip -9 -j -r "dist/um-windows-amd64.zip" $DIST_DIR
|
||||
environment:
|
||||
@ -70,23 +69,22 @@ steps:
|
||||
from_secret: GITEA_API_KEY
|
||||
image: golang:1.22
|
||||
name: upload artifact
|
||||
trigger:
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
type: docker
|
||||
---
|
||||
kind: pipeline
|
||||
name: build darwin/amd64
|
||||
steps:
|
||||
type: docker
|
||||
- kind: pipeline
|
||||
name: build darwin/amd64
|
||||
steps:
|
||||
- commands:
|
||||
- git fetch --tags
|
||||
image: alpine/git
|
||||
name: fetch tags
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64.tar.gz"
|
||||
environment:
|
||||
@ -106,15 +104,14 @@ steps:
|
||||
from_secret: GITEA_API_KEY
|
||||
image: golang:1.22
|
||||
name: upload artifact
|
||||
trigger:
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
type: docker
|
||||
---
|
||||
kind: pipeline
|
||||
name: release
|
||||
steps:
|
||||
type: docker
|
||||
- kind: pipeline
|
||||
name: release
|
||||
steps:
|
||||
- commands:
|
||||
- git fetch --tags
|
||||
image: alpine/git
|
||||
@ -127,8 +124,8 @@ steps:
|
||||
name: go test
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64.tar.gz"
|
||||
environment:
|
||||
@ -139,8 +136,8 @@ steps:
|
||||
name: go build linux/amd64
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-arm64.tar.gz"
|
||||
environment:
|
||||
@ -151,8 +148,8 @@ steps:
|
||||
name: go build linux/arm64
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-386.tar.gz"
|
||||
environment:
|
||||
@ -163,8 +160,8 @@ steps:
|
||||
name: go build linux/386
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- zip -9 -j -r "dist/um-windows-amd64.zip" $DIST_DIR
|
||||
environment:
|
||||
@ -175,8 +172,8 @@ steps:
|
||||
name: go build windows/amd64
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- zip -9 -j -r "dist/um-windows-386.zip" $DIST_DIR
|
||||
environment:
|
||||
@ -187,8 +184,8 @@ steps:
|
||||
name: go build windows/386
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64.tar.gz"
|
||||
environment:
|
||||
@ -199,8 +196,8 @@ steps:
|
||||
name: go build darwin/amd64
|
||||
- commands:
|
||||
- DIST_DIR=$(mktemp -d)
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
||||
--always)" -o $DIST_DIR ./cmd/um
|
||||
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe
|
||||
--tags --always)" -o $DIST_DIR ./cmd/um
|
||||
- mkdir -p dist
|
||||
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-arm64.tar.gz"
|
||||
environment:
|
||||
@ -219,7 +216,7 @@ steps:
|
||||
draft: true
|
||||
files: dist/*
|
||||
title: ${DRONE_TAG}
|
||||
trigger:
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
type: docker
|
||||
type: docker
|
||||
|
Loading…
Reference in New Issue
Block a user