Compare commits

...

3 commits

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

View file

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