Compare commits
No commits in common. "main" and "0.2.0-" have entirely different histories.
1 changed files with 22 additions and 39 deletions
|
@ -8,57 +8,34 @@ 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"
|
||||||
.compile: &compile
|
build:
|
||||||
stage: compile
|
stage: build
|
||||||
rules:
|
rules:
|
||||||
- if: $VERSION
|
- if: $VERSION
|
||||||
script:
|
script:
|
||||||
- *setup_scripts
|
- apt-get -y install rustup libdbus-glib-1-dev
|
||||||
- mkdir -p ./build;cargo deb --output ./build
|
- rustup default stable
|
||||||
|
- 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:x86_64
|
- build
|
||||||
- build:aarch64
|
|
||||||
rules:
|
rules:
|
||||||
- if: $VERSION
|
- if: $VERSION
|
||||||
script:
|
script:
|
||||||
- find ./build -name "*.deb"
|
- file=$( find ./build -name "*.deb" | head -n 1 )
|
||||||
- debs=( $( find ./build -name "*.deb" ) )
|
- export filename=$( basename $file )
|
||||||
- assets=""
|
- package_url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gtkgreet/${VERSION}/${filename}"
|
||||||
- for d in ${debs[@]};do
|
- "curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" --upload-file \"${file}\" \"${package_url}\""
|
||||||
- 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
|
||||||
|
@ -66,6 +43,12 @@ release:
|
||||||
rules:
|
rules:
|
||||||
- if: $VERSION
|
- if: $VERSION
|
||||||
script:
|
script:
|
||||||
- echo "making release!"
|
- echo "making release! ${package_url}"
|
||||||
- echo ${ASSETS_ARG}
|
release:
|
||||||
- release-cli create --name "Release ${VERSION}" --tag-name "${VERSION}" ${ASSETS_ARG}
|
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"
|
||||||
|
|
||||||
|
|
Reference in a new issue