Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
phitem
Design Linux UGA
Commits
062f3b25
Commit
062f3b25
authored
Jun 16, 2021
by
Maxime Accadia
Browse files
Add gitlab-ci.yml
parent
e53011bb
Pipeline
#69125
failed
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
062f3b25
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}\"}"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment