Commit 062f3b25 authored by Maxime Accadia's avatar Maxime Accadia
Browse files

Add gitlab-ci.yml

parent e53011bb
Pipeline #69125 failed
stages:
- build
- upload
- release
variables:
# Package version can only contain numbers (0-9), and dots (.).
# Must be in the format of X.Y.Z, i.e. should match /\A\d+\.\d+\.\d+\z/ regular expresion.
# See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
PACKAGE_VERSION: "$CI_COMMIT_TAG"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/deb/${PACKAGE_VERSION}"
DEB_FILE: "design-linux-uga.deb"
build:
stage: build
image: debian:latest
rules:
- if: $CI_COMMIT_TAG
script:
- sed -i "s/Version:.*/Version: $CI_COMMIT_TAG/" debian/control
- bash mkdeb.sh
artifacts:
paths:
- $DEB_FILE
upload:
stage: upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${DEB_FILE} ${PACKAGE_REGISTRY_URL}/${DEB_FILE}
release:
# Caution, as of 2021-02-02 these assets links require a login, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/299384
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${DEB_FILE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${DEB_FILE}\"}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment