From 10523cb54bf72958595180e33704aab9aae369bb Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Thu, 27 Jul 2023 15:01:54 +0200 Subject: [PATCH] chore(ci): publish binaries on release --- .woodpecker/rel.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .woodpecker/rel.yml diff --git a/.woodpecker/rel.yml b/.woodpecker/rel.yml new file mode 100644 index 0000000..28b882d --- /dev/null +++ b/.woodpecker/rel.yml @@ -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