add cicd
This commit is contained in:
parent
3f761c567c
commit
20ea135c53
2 changed files with 32 additions and 0 deletions
11
.woodpecker/lint.yaml
Normal file
11
.woodpecker/lint.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
steps:
|
||||||
|
lint:
|
||||||
|
image: golang:1.22
|
||||||
|
commands:
|
||||||
|
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
|
- golangci-lint run
|
||||||
|
when:
|
||||||
|
- event: pull_request
|
||||||
|
repo: enpls/epee-service
|
||||||
|
- event: push
|
||||||
|
branch: main
|
21
.woodpecker/release.yaml
Normal file
21
.woodpecker/release.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
steps:
|
||||||
|
- name: Build
|
||||||
|
image: golang:1.22
|
||||||
|
commands:
|
||||||
|
- go mod download
|
||||||
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o epee-linux-amd64 # Enable static binary, target Linux, remove debug information and strip binary
|
||||||
|
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-w -s" -o epee-linux-arm64
|
||||||
|
- CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-w -s" -o epee-linux-arm
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
- name: Release
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://git.gnous.eu
|
||||||
|
files:
|
||||||
|
- "epee-*"
|
||||||
|
api_key:
|
||||||
|
from_secret: release_token
|
||||||
|
target: main
|
||||||
|
when:
|
||||||
|
event: tag
|
Loading…
Reference in a new issue