chore(ci): publish binaries on release
parent
5faa2a4655
commit
10523cb54b
|
@ -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
|
Loading…
Reference in New Issue