From 04a488cdf2e4d9347294c73048d7cba9d4100857 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 14 Jun 2022 13:55:19 +0200 Subject: [PATCH] Updated .gitlab-ci.yml, to fix medusa versioning and docker builds. hopefully for the last time --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84d4bd219..ace7ade00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,13 +101,13 @@ upload-windows-updater-release: publish-medusa-package: stage: publish-medusa-package rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG script: - LAST_TAG=$(git describe --tags --abbrev=0) - if [ $CI_COMMIT_TAG ];then MEDUSA_VERSION="$CI_COMMIT_TAG"; else MEDUSA_VERSION="$LAST_TAG-$CI_COMMIT_SHA"; fi - cd src/Nadeko.Medusa/ - dotnet pack -c Release /p:Version=$MEDUSA_VERSION -o bin/Release/packed - - dotnet nuget push bin/Release/packed/ --source https://www.myget.org/F/nadeko/api/v2/package --api-key "$MYGET_API_KEY" + - dotnet nuget push bin/Release/packed/ --source https://www.myget.org/F/nadeko/api/v2/package --api-key "$MYGET_API_KEY" docker-build: # Use the official docker image. @@ -132,6 +132,6 @@ docker-build: - docker push "$CI_REGISTRY_IMAGE${tag}" # Run this job in a branch where a Dockerfile exists rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG exists: - Dockerfile