mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
stages:
|
|
- test
|
|
- build
|
|
- upload
|
|
- release
|
|
|
|
variables:
|
|
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/nyxi-installer/${CI_COMMIT_TAG}"
|
|
|
|
test:
|
|
stage: test
|
|
image: rust:latest
|
|
before_script:
|
|
- apt update -m
|
|
- apt install -y libfdisk-dev libclang-19-dev
|
|
script:
|
|
- cargo test --verbose
|
|
|
|
build:
|
|
stage: build
|
|
image: rust:latest
|
|
before_script:
|
|
- apt update -m
|
|
- apt install -y libfdisk-dev libclang-19-dev
|
|
script:
|
|
- cargo build --release
|
|
- mkdir bin
|
|
- mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer
|
|
- chmod +x /bin/nyxi-installer
|
|
cache:
|
|
paths:
|
|
- target/release/
|
|
artifacts:
|
|
paths:
|
|
- bin
|
|
|
|
upload:
|
|
stage: upload
|
|
image: curlimages/curl:latest
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
script:
|
|
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file /bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer'
|
|
|
|
release:
|
|
stage: release
|
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
script:
|
|
- echo "running release_job"
|
|
release:
|
|
tag_name: '$CI_COMMIT_TAG'
|
|
description: '$CI_COMMIT_TAG'
|