43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
|
matrix:
|
||
|
PLATFORM:
|
||
|
- 'linux/amd64'
|
||
|
|
||
|
platform: ${PLATFORM}
|
||
|
|
||
|
when:
|
||
|
branch: [main, dev]
|
||
|
event: [push, tag]
|
||
|
|
||
|
steps:
|
||
|
build:
|
||
|
image: 'git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19'
|
||
|
commands:
|
||
|
- cargo build --verbose --release
|
||
|
- '[ "$(readelf -d target/release/rieterd | grep NEEDED | wc -l)" = 0 ]'
|
||
|
|
||
|
publish-dev:
|
||
|
image: 'git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19'
|
||
|
commands:
|
||
|
- apk add --no-cache minio-client
|
||
|
- mcli alias set rb 'https://s3.rustybever.be' "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
|
||
|
- mcli cp target/release/rieterd "rb/rieter/commits/$CI_COMMIT_SHA/rieterd-$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
||
|
secrets:
|
||
|
- minio_access_key
|
||
|
- minio_secret_key
|
||
|
when:
|
||
|
branch: dev
|
||
|
event: push
|
||
|
|
||
|
publish-rel:
|
||
|
image: 'curlimages/curl'
|
||
|
commands:
|
||
|
- >
|
||
|
curl -s --fail
|
||
|
--user "Chewing_Bever:$GITEA_PASSWORD"
|
||
|
--upload-file target/release/rieterd
|
||
|
https://git.rustybever.be/api/packages/Chewing_Bever/generic/rieter/"${CI_COMMIT_TAG}"/rieterd-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
||
|
secrets:
|
||
|
- gitea_password
|
||
|
when:
|
||
|
event: tag
|