Compare commits

...

9 commits
0.2.0- ... main

Author SHA1 Message Date
Penelope Gwen
adaafaab8b update pipeline 2024-04-24 21:04:42 -06:00
Penelope Gwen
b4a62f2f37 update pipeline 2024-04-24 21:00:50 -06:00
d0ea91abf4 update pipelines 2024-04-23 19:13:16 -06:00
9fa49ef435 update pipelines 2024-04-23 19:07:31 -06:00
7088893a88 update pipelines 2024-04-23 19:02:06 -06:00
f6c953c62f update pipelines 2024-04-23 19:01:12 -06:00
3aeba46830 update pipelines 2024-04-23 18:33:38 -06:00
fa9276855e update pipelines 2024-04-23 18:32:07 -06:00
7cb50a53b2 update pipelines 2024-04-23 18:25:39 -06:00

View file

@ -8,34 +8,57 @@ stages:
- upload
- release
.setup_script: &setup_scripts
- apt-get -y install rustup libdbus-glib-1-dev
- rustup default stable
- cargo install cargo-deb
# Stage "build"
build:
stage: build
.compile: &compile
stage: compile
rules:
- if: $VERSION
script:
- apt-get -y install rustup libdbus-glib-1-dev
- rustup default stable
- cargo install cargo-deb
- mkdir ./build;cargo deb --output ./build
# The files which are to be made available in GitLab
- *setup_scripts
- mkdir -p ./build;cargo deb --output ./build
artifacts:
paths:
- build/*
untracked: true
build:x86_64:
<<: *compile
stage: build
tags:
- x86_64
build:aarch64:
<<: *compile
stage: build
tags:
- aarch64
upload:
stage: upload
dependencies:
- build
- build:x86_64
- build:aarch64
rules:
- if: $VERSION
script:
- file=$( find ./build -name "*.deb" | head -n 1 )
- export filename=$( basename $file )
- package_url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gtkgreet/${VERSION}/${filename}"
- "curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" --upload-file \"${file}\" \"${package_url}\""
- find ./build -name "*.deb"
- debs=( $( find ./build -name "*.deb" ) )
- assets=""
- for d in ${debs[@]};do
- file=$( basename ${d} )
- url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/batalert/${VERSION}/${file}"
- assets="${assets} --assets-link {\"name\":\"${file}\",\"url\":\"${url}\",\"link_type\":\"other\"} "
- "curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" --upload-file \"${d}\" \"${url}\""
- done
- echo "ASSETS_ARG=${assets}" >> assets.env
artifacts:
reports:
dotenv: assets.env
release:
stage: release
@ -43,12 +66,6 @@ release:
rules:
- if: $VERSION
script:
- echo "making release! ${package_url}"
release:
tag_name: "${VERSION}-${CI_RUNNER_EXECUTABLE_ARCH#*/}"
description: "batalert ${VERSION} ${CI_RUNNER_EXECUTABLE_ARCH}"
assets:
links:
- name: "${CI_RUNNER_EXECUTABLE_ARCH} deb"
url: "$package_url"
- echo "making release!"
- echo ${ASSETS_ARG}
- release-cli create --name "Release ${VERSION}" --tag-name "${VERSION}" ${ASSETS_ARG}