dotfiles/.gitlab-ci.yml

20 lines
728 B
YAML
Raw Normal View History

2023-01-20 15:43:17 +00:00
stages:
- build
variables:
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/installer"
2023-01-20 15:43:17 +00:00
2023-01-25 12:25:12 +00:00
build:
2023-01-20 15:43:17 +00:00
stage: build
image: rust:alpine
rules:
- if: $CI_COMMIT_BRANCH == "installer"
2023-01-20 15:43:17 +00:00
script:
- apk add pkgconf musl-dev curl
2023-01-25 12:25:12 +00:00
- RUSTFLAGS='-C target-feature=+crt-static -C link-self-contained=yes -C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl
- cp target/x86_64-unknown-linux-musl/release/dotfiles_installer ./installer-amd64
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file installer-amd64 "${PACKAGE_REGISTRY_URL}/dev-$CI_COMMIT_SHA/installer-amd64"'
2023-01-20 15:43:17 +00:00
artifacts:
paths:
2023-01-25 12:25:12 +00:00
- installer-amd64