diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0191dc37972ed7f28101ddf246f5ef8b5105be3..a091114c7ae77d4e65038016de9663b4b200cc55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,8 @@ tests: - pnpm-lock.yaml paths: - node_modules/ + rules: + - if: '$CI_PUSH_OPTION_CI_VARIABLE == null' web-tests: stage: test @@ -51,7 +53,7 @@ web-tests: paths: - screenshot.png rules: - - if: '$CI_COMMIT_TAG == null' + - if: '$CI_PUSH_OPTION_CI_VARIABLE == null' release: stage: release @@ -61,8 +63,8 @@ release: - nix develop .#gitlab --command release when: on_success rules: - - if: '$CI_COMMIT_TAG == null' - + - if: '$CI_PUSH_OPTION_CI_VARIABLE == null' + deploy: stage: deploy tags: @@ -71,6 +73,6 @@ deploy: - nix develop .#gitlab --command build-and-publish when: on_success rules: - - if: '$CI_COMMIT_TAG != null' - + - if: '$CI_PUSH_OPTION_CI_VARIABLE' + when: always \ No newline at end of file diff --git a/nix/scripts/release.nix b/nix/scripts/release.nix index 1addd2f10c0f259c8661ebfd42ddf02b6d0c5c33..3e32de7d137445eafd5cd568904433004210da92 100644 --- a/nix/scripts/release.nix +++ b/nix/scripts/release.nix @@ -70,7 +70,7 @@ in if ${pkgs'.git}/bin/git tag -l | grep -q "$gitVersion"; then echo_step "Tag $gitVersion existiert bereits. Lösche und setze den Tag neu." ${pkgs'.git}/bin/git tag -d "$gitVersion" - ${pkgs'.git}/bin/git push -o ci.skip origin --delete "$gitVersion" + ${pkgs'.git}/bin/git push --push-option= ci.skip origin --delete "$gitVersion" fi ${pkgs'.git}/bin/git tag -a "$gitVersion" -m"chore: bump version to $gitVersion" @@ -87,10 +87,10 @@ in ${pkgs'.git}/bin/git tag -a "$gitVersion" -m"chore: bump version to $gitVersion" ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5 - if ! ${pkgs'.git}/bin/git push origin "$CI_COMMIT_REF_NAME" --tags ; then + if ! ${pkgs'.git}/bin/git push --push-option=ci.variable="DEPLOY_VERSION=$gitVersion" origin "$CI_COMMIT_REF_NAME" --tags ; then echo_fail "Error: Could not push git tag $gitVersion." exit 1 - fi + fi echo_ok "done" ''