2023-06-05 10:32:50 +02:00
|
|
|
matrix:
|
|
|
|
PLATFORM:
|
|
|
|
- 'linux/amd64'
|
2023-06-05 11:39:57 +02:00
|
|
|
- 'linux/arm64'
|
2023-06-05 10:32:50 +02:00
|
|
|
|
2023-08-12 14:09:22 +02:00
|
|
|
labels:
|
|
|
|
platform: ${PLATFORM}
|
2023-06-05 10:32:50 +02:00
|
|
|
|
2023-08-12 14:09:22 +02:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
steps:
|
2023-06-05 10:32:50 +02:00
|
|
|
build:
|
2023-08-12 14:09:22 +02:00
|
|
|
image: 'rust:1.71-alpine3.18'
|
2023-06-05 10:32:50 +02:00
|
|
|
commands:
|
|
|
|
- apk add --no-cache build-base
|
|
|
|
- cargo build --release --verbose
|
|
|
|
# Ensure the release binary is also statically compiled
|
|
|
|
- '[ "$(readelf -d target/release/alex | grep NEEDED | wc -l)" = 0 ]'
|
|
|
|
- du -h target/release/alex
|
|
|
|
|
|
|
|
publish:
|
2023-06-05 11:39:57 +02:00
|
|
|
image: 'curlimages/curl'
|
2023-06-05 10:32:50 +02:00
|
|
|
secrets:
|
2023-06-05 11:39:57 +02:00
|
|
|
- gitea_password
|
|
|
|
commands:
|
|
|
|
- >
|
|
|
|
curl -s --fail
|
|
|
|
--user "Chewing_Bever:$GITEA_PASSWORD"
|
|
|
|
--upload-file target/release/alex
|
|
|
|
https://git.rustybever.be/api/packages/Chewing_Bever/generic/alex/"${CI_COMMIT_TAG}"/alex-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|