2021-08-07 14:32:34 -04:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- make
|
|
|
|
|
2021-10-15 11:12:54 -04:00
|
|
|
- name: create release-source tar
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go mod vendor
|
2021-10-15 11:27:12 -04:00
|
|
|
- tar -czf release-source-$DRONE_TAG.tar.gz *
|
2021-10-15 11:22:26 -04:00
|
|
|
- mkdir dist
|
2021-10-15 11:26:04 -04:00
|
|
|
- mv release-source-$DRONE_TAG.tar.gz dist/
|
2021-10-15 11:12:54 -04:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
- name: create release-binary tar
|
2021-08-07 14:32:34 -04:00
|
|
|
image: golang
|
|
|
|
commands:
|
2021-10-15 11:14:17 -04:00
|
|
|
- mkdir build
|
2021-08-07 15:10:01 -04:00
|
|
|
- DESTDIR=build make install
|
2021-08-07 15:15:05 -04:00
|
|
|
- tar -czf dist/release-$DRONE_TAG-$DRONE_STAGE_ARCH.tar.gz build/* init/*
|
2021-08-07 14:32:34 -04:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
- name: release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
files:
|
|
|
|
- dist/*
|
|
|
|
base_url: https://git.saintnet.tech
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|