2021-03-27 03:47:13 +00:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: golang:latest
|
|
|
|
group: build
|
|
|
|
volumes:
|
|
|
|
- name: build
|
|
|
|
path: /build
|
|
|
|
commands:
|
|
|
|
- mkdir -p /build
|
|
|
|
- GOOS=linux GOARCH=386 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_linux_i386
|
|
|
|
- GOOS=linux GOARCH=amd64 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_linux_amd64
|
|
|
|
- GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_linux_armv7
|
|
|
|
- GOOS=linux GOARCH=arm64 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_linux_arm64
|
|
|
|
- GOOS=windows GOARCH=386 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_windows_i386.exe
|
|
|
|
- GOOS=windows GOARCH=amd64 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_windows_amd64.exe
|
|
|
|
- GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_macos_arm64
|
|
|
|
- GOOS=darwin GOARCH=amd64 go build -ldflags="-X 'cmd.Key=$API_KEY'" -o /build/pastee_macos_amd64
|
|
|
|
environment:
|
|
|
|
API_KEY:
|
|
|
|
from_secret: api_key
|
|
|
|
- name: release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
volumes:
|
|
|
|
- name: build
|
|
|
|
path: /build
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
2021-03-27 03:51:28 +00:00
|
|
|
base_url: https://git.meow.tf
|
2021-03-27 03:47:13 +00:00
|
|
|
files:
|
|
|
|
- /build/pastee_*
|
|
|
|
environment:
|
|
|
|
PLUGIN_API_KEY:
|
|
|
|
from_secret: gitea_token
|
|
|
|
when:
|
2021-03-27 03:51:28 +00:00
|
|
|
event: tag
|
|
|
|
volumes:
|
|
|
|
- name: build
|
|
|
|
temp: {}
|