chore(ci): publish binaries on release

lsm
Jef Roosens 2023-07-27 15:01:54 +02:00
parent 5faa2a4655
commit 10523cb54b
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
matrix:
PLATFORM:
- 'linux/amd64'
- 'linux/arm64'
platform: ${PLATFORM}
branches: [ main ]
pipeline:
build:
image: 'alpine:3.18.0'
commands:
- apk add --update --no-cache build-base make
- make CFLAGS='-O3 -static' LDFLAGS='-flto'
- strip build/lander
- '[ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ]'
when:
event: tag
publish:
image: 'curlimages/curl'
secrets:
- gitea_password
commands:
- >
curl -s --fail
--user "Chewing_Bever:$GITEA_PASSWORD"
--upload-file build/lander
https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/lander-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
when:
event: tag