diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f87becd587048ac0e1f3de86a3d508896cb5f8f..f7c2ec3bcf9fec7d1784ce1aeb6affa9edd9738a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ stages: - build - test_unix - test_win + - upload before_script: - dotnet --version @@ -21,6 +22,12 @@ build_view: tags: [windows] script: - dotnet build CSIP-42.ThemePark.sln + - dotnet publish CSIP-42.ThemePark.View\CSIP-42.ThemePark.View.csproj -c Release -o publish + artifacts: + name: 'csip-42_binaries' + expire_in: 3 days + paths: + - publish test_construction_model: @@ -51,3 +58,17 @@ test_simulation_model_win: script: - dotnet test CSIP-42.ThemePark.Model.Simulation.Test +upload_binaries: + stage: upload + image: ubuntu:20.04 + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v.*$/' + variables: + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/windows-release/$CI_COMMIT_TAG" + before_script: + - apt-get update -y + - apt-get install -y zip curl + script: + - zip -r publish.zip publish/ + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file publish.zip "${PACKAGE_REGISTRY_URL}/windows-release-$CI_COMMIT_TAG.zip" \ No newline at end of file