From 5175e69e0a14a9e9d318283fe19ddf525b3cfe49 Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Mon, 20 Jun 2022 12:11:53 +0200 Subject: [PATCH] Publish linux_x64 artifact in generic registry It is a requirements for building flatpak package Ref: https://gitlab.e.foundation/e/backlog/-/issues/5545 --- .gitlab-ci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3aa59eb..ef0fcd70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,7 +56,7 @@ build-aur-docker: - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - docker push $CONTAINER_IMAGE/aur:$CONTAINER_TAG -build-ubuntu: +build-snap: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build variables: @@ -69,6 +69,20 @@ build-ubuntu: paths: - easy-installer*.snap +build-linux-x64: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - ./gradlew dist + artifacts: + name: "easy-installer-$CI_COMMIT_TAG-linux_x64" + paths: + - build/image/easy-installer-linux-x64/ + rules: + - if: $CI_COMMIT_TAG + build-windows: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build @@ -180,3 +194,14 @@ publish-aur: rules: - if: '$CI_COMMIT_TAG' when: manual + +publish-linux-x64: + image: curlimages/curl:latest + stage: publish + variables: + PKG_NAME: easy-installer-$CI_COMMIT_TAG-linux_x64.zip + script: + - 'curl "$CI_JOB_URL/artifacts/$CI_COMMIT_TAG/browse?job=build-linux-x64" --output "$PKG_NAME"' + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "$PKG_NAME" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/easy-installer/$CI_COMMIT_TAG/$PKG_NAME"' + rules: + - if: '$CI_COMMIT_TAG' -- GitLab